Code: Select all
SHIFT
IF NOT "%~1"=="" GOTO loop
1) Do not run the batch file with your mouse. Open up a command prompt and run it from there.
2) Use ECHO ON at the top of your script.
Code: Select all
SHIFT
IF NOT "%~1"=="" GOTO loop
Code: Select all
if !string:~%counter%,1! EQU 1
Code: Select all
if "%%~a"=="DataBasePath" CALL set "hostspath=%%b"
We have a discussion about it here on DosTips. I will see if I can dig up that thread.mataha wrote: ↑29 Feb 2024 16:24Escaping the quotes shouldn't be necessary:
Code: Select all
for /f delims^= %%g in ('""D:\some\path\with blanks inside\myprog.exe" -p "......" %1"') do set "....."
Code: Select all
for /F "Tokens=*" %%G in (' ^""D:\some\path\with blanks inside\myprog.exe" -p "......" %1^"') do set "....."
Code: Select all
for %%G in ("aaaa.dat") do for /f "tokens=1-5 delims=/: " %%H IN ("%%~tG") do set "aaaats=%%J%%H%%I%%K%%L"