1

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
TylerH
  • 20,799
  • 66
  • 75
  • 101
Iftek Har
  • 161
  • 3
  • 5
  • 13
  • 2
    by default tasks are created with low priority class, read the last paragraph of https://www.dostips.com/forum/viewtopic.php?f=3&t=8425#p55881 to change priority – elzooilogico May 18 '20 at 21:45
  • 7zip tends to execute slower when you are running it from a non 7zip application (like command-prompt or task-scheduler) – Nico Nekoru May 18 '20 at 22:28

0 Answers0