Young girl in Uruk, Iraq.

Iraq, not too long ago. I was heading out on foot across the desert, battling through a sandstorm, to reach the ruins of Uruk, that ancient city famous for its part in the Epic of Gilgamesh. Not too far from here, alone and remote, a small village eke out a living. The sandstorm had imparted a reddish-yellow colour to the entire scene but I was recently able to correct for this and, in the process, recover this engaging image of a young girl near the village edge.

Reconnect mapped network drives in Windows OS using Command Prompt script

This is an update of my blog entry https://www.metalvortex.com/blog/2016/07/24/1903.html where I published a Windows 10 Pro Command Prompt script to reconnect mapped network drives at log on. This was saved as a .CMD batch file and then executed twice using Task Scheduler; one in non-admin and the other in admin mode. This allows mapped drives to be visible to those applications running in non-admin and also to those applications running in admin modes.

I’ve made some minor tweaks to the code so it should be a little more robust against errors.

@ECHO OFF
SETLOCAL ENABLEEXTENSIONS ENABLEDELAYEDEXPANSION
SET me=%~n0
SET parent=%~dp0

TITLE Mapping network drives
@ECHO Please wait whilst we reconnect your network drives.

SET neterror=0

SET counter=1
SET loopvalue=11
SET /A trueloop=%loopvalue%-1
:Start
ECHO _____________________________________
ECHO:
IF "%counter%" EQU "%loopvalue%" (
ECHO Connection to D:\ drive timed-out
SET neterror=1
GOTO End
)
ECHO Attempt %counter% of %trueloop% to D:\ drive
TIMEOUT /t 5 /NOBREAK >NUL
IF EXIST D:\NUL (
ECHO Attempt %counter% successful.
GOTO End
)
NET USE D: \\192.168.49.69\Data /PERSISTENT:YES
IF "%ERRORLEVEL%" NEQ "0" IF "%ERRORLEVEL%" NEQ "85" (
SET /A counter=%counter%+1
GOTO Start
)
:End

IF "%neterror%" EQU "0" GOTO Endofscript

:userconfirm
ECHO _____________________________________
ECHO:
SET /P userinput="Errors were found. Do you wish to try again [Y/n] "
IF /I "%userinput%" EQU "y" GOTO Start
IF /I "%userinput%" EQU "" GOTO Start
IF /I "%userinput%" EQU "n" GOTO Endofscript
GOTO userconfirm

:Endofscript
ECHO _____________________________________
ECHO:
@ECHO Please wait, script is closing.
TIMEOUT /t 5 /NOBREAK >NUL
ENDLOCAL
@ECHO OFF
@EXIT /B 0

Leopard

A leopard with the remains of an impala in Samburu National Reserve, Kenya. Photo taken in May 2017.

El Molo men

Two young men of the El Molo tribe at the Lake Turkana Festival in northern Kenya. The El Molo is the smallest tribe in Kenya with only a few members left. Photo taken in May 2017.

Turkana woman

Turkana woman giving some directions to her friends along the windswept shores of Lake Turkana, Kenya.