Code: Select all
setlocal enabledelayedexpansion
FOR /F "usebackq delims=" %%G IN ("p1ds1.txt") DO (
Set "line=%%G" & echo !line:A =!
)>>"p1ds2.txt"
FOR /F "usebackq delims=" %%G IN ("p1ds2.txt") DO (
Set "line=%%G" & echo !line:%zip%.zip=!
)>>"p1ds3.txt"
endlocal
this is what I have for a search function to grab the path of the file I input. This is just a small part of my whole script.
My question is that after this (even with endlocal) none of my regular commands work, ie xcopy, java (yes i have java set up on my comp)
they just come up with '(command here)' is not recognized as an internal or external command, program or batch script...
They all work fine in a regular cmd window, but not in my bat after the setlocal/endlocal part.
any reasons why? thanks for your help