Reputation: 21
i have a .bat file that uses 7zip for compressing. It creates an archive for every single file in a folder. It works both with win 2003 or win 2008.
Here's my problem:
on a new server win 2008 based, it compress every file in one single archive.
Here the script:
for %%X in (*) do "C:\TOOLS\7zip\App\7-Zip\7z.exe" a "%%~nX.zip" "%%X"
Any suggestion?
Upvotes: 0
Views: 1543
Reputation: 8302
You might like doing as below...
for /d %%x in (D:\Your_folder_path\*.*) do "C:\Program Files\7-Zip\7z.exe" a -tzip "%%x.zip" "%%x\"
Upvotes: 1