2
1
I am using this command below to unzip recursively from the source folder(D:\cnosftp\
) and put the extracted file in the same subfolder.
FOR /R "D:\cnosftp\" %I IN (*.gz) DO "C:\Program Files\7-Zip\7z.exe" x "%I" -aoa -o"%~dpI"
This is working well when run in CMD - but when same command is put in a batch file and run - it triggers but closes in a blip without any action. Any idea what am I doing here? Or anyone can tell how to wrap it in a batch file.
Use two percent signs in the
FOR
command for variables. . .FOR /R "D:\cnosftp\" %%I IN (*.gz) DO "C:\Program Files\7-Zip\7z.exe" x "%%I" -aoa -o"%%~dpI"
to run it as a batch file. – Pimp Juice IT – 2018-09-02T03:24:17.677