I am compressing folders by 7Zip and deleting original folder with Batch and Task Scheduler. Folders and their inside files are continuously downloading and creating new folders as well. I want to save my disc space so that I make a Batch file and add in Scheduler to run every hour. I have two issues one is compressing is very slow. Every folder compressing in 2 hours however it compressing in some minutes if I manually compressing it by right click on folder.
I think in my code I am making a mistake.
for /d %%X in (*) do "c:\Program Files\7-Zip\7z.exe" a -up1q1r2x1y1z1w1 "%%X.7z" "%%X\"
for /d %%X in (*) do RMDIR "%%X" /S /Q
2nd is I am working five location with 5 CMD on same time running by following Batch file, I want one code which can run, compress and delete folders in one CMD window, but should work for different location.
cd /d D:\Folder1
start Code1.bat
cd /d D:\Folder2
start Code2.bat
cd /d D:\Folder3
start Code3.bat
cd /d D:\Folder4
start Code4.bat
cd /d D:\Folder5
start Code5.bat
exit