WorknHardr
asked on
DOS For Do Goto Replaces Call?
Cool title huh. Anyway, I've been using two DOS batch files and would like to consolidate them into one batch file. Unsure how to do the 'Call'.
( Batch File #1 )
For %%i In (\bin\*.dll) Do (Call BatchFile2.bat "%%~i")
( Batch File #2 )
set "ESP=C:\Program Files\eSoft\Protector"
set "SAFE=%1"
"%ESP%"\Protector.exe
-source %1
-target %SAFE%
( Possible One Batch File Solution Not Working )
For %%i In (\bin\*.dll) Do (Goto NEXT "%%~i")
:NEXT
set "ESP=C:\Program Files\eSoft\Protector"
set "SAFE=%1"
"%ESP%"\Protector.exe
-source %1
-target %SAFE%
( Batch File #1 )
For %%i In (\bin\*.dll) Do (Call BatchFile2.bat "%%~i")
( Batch File #2 )
set "ESP=C:\Program Files\eSoft\Protector"
set "SAFE=%1"
"%ESP%"\Protector.exe
-source %1
-target %SAFE%
( Possible One Batch File Solution Not Working )
For %%i In (\bin\*.dll) Do (Goto NEXT "%%~i")
:NEXT
set "ESP=C:\Program Files\eSoft\Protector"
set "SAFE=%1"
"%ESP%"\Protector.exe
-source %1
-target %SAFE%
ASKER
yea, more logical. I need the target file path different from the source. I've been using this substitution syntax, not working now:
set "ESP=C:\Program Files\eSoft\Protector"
set "SAFE=%1"
Set "SAFE=%SAFE:Published=Rele ase%"
"%ESP%"\Protector.exe
-source %1
-target %SAFE%
set "ESP=C:\Program Files\eSoft\Protector"
set "SAFE=%1"
Set "SAFE=%SAFE:Published=Rele
"%ESP%"\Protector.exe
-source %1
-target %SAFE%
ASKER CERTIFIED SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
ASKER
Thx
Open in new window
~bp