NLITech
asked on
cannot make it run as a batch file
I am able to run the following from the command prompt with success, but I cannot make it run as a batch file any help making this run from a .bat file is appreciated
CD /D "D: \PDFBills"
set "source=D: \PDFBills\UnZip"
set "targetRoot=D:\ PDFBills\MonthlyPDFBills"
for %F in ("%source%\*") do (
for /f "tokens=1,2,3 delims=/ " %A in ("%~tF") do (
if not exist "%targetRoot%\%C\%A" mkdir "%targetRoot%\%C\%A"
move "%~fF" "%targetRoot%\%C\%A"
)
)
Lori
CD /D "D: \PDFBills"
set "source=D: \PDFBills\UnZip"
set "targetRoot=D:\ PDFBills\MonthlyPDFBills"
for %F in ("%source%\*") do (
for /f "tokens=1,2,3 delims=/ " %A in ("%~tF") do (
if not exist "%targetRoot%\%C\%A" mkdir "%targetRoot%\%C\%A"
move "%~fF" "%targetRoot%\%C\%A"
)
)
Lori
ASKER CERTIFIED SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
no problem
ASKER