Exploring shared location from batch file

Closed
faiz - 25 Sep 2008 à 23:15
kickeffel Posts 17 Registration date Tuesday 26 August 2008 Status Member Last seen 6 June 2009 - 26 Sep 2008 à 07:05
Hello,

setlocal enabledelayedexpansion
sdds this is to set errorlevel a nonzero value
FOR /L %%i IN (1,1,100000) DO (
echo on
echo !errorlevel!
explorer "\\n8059\My_CC_Share\GeoS"
echo !errorlevel!
if !errorlevel! == 0 (
endlocal
exit))


am using this script to open a shared location which is always pinged by a lot of people.
hence this script will open the folder whenever the connectin available.
the issue with this is this will go on running even if the folder get opened.
The root cause is that explorer is not setting the errorlevel

can any one help
Related:

1 response

kickeffel Posts 17 Registration date Tuesday 26 August 2008 Status Member Last seen 6 June 2009 5
26 Sep 2008 à 07:05
hello,

here is a link which might help you in creating your batch file :

https://www.computerhope.com/batch.htm#11