- http://www.tomshardware.com/forum/46711-63-solved-batch-file-commands-executed
- https://stackoverflow.com/questions/18180060/how-to-zip-a-file-using-cmd-line
- https://superuser.com/questions/993083/create-multiple-zip-files?rq=1
- Download http://www.7-zip.org/
- Install 7-zip – you can install it on your external hard drive, if you want (that’s what I did).
- On your laptop, right-click on the Desktop and from the menu that pops up, select New > Text Document.
- After Notepad opens, paste the following text in the Notepad window:
for /d %%X in (*) do "b:\Program Files\7-Zip\7z.exe" a "%%X.zip" "%%X\" -mx=5 –tzip
- You will need to replace the path in quotes with the path to where you installed. If you install to your external hard drive and it’s your “E” drive, you would have this text:
- for /d %%X in (*) do "e:\Program Files\7-Zip\7z.exe" a "%%X.zip" "%%X\" -mx=5 –tzip
- Save the file as zipall.bat.
- On the Desktop, select the file, right-click, and select Copy.
- Find a folder that has many sub-folders in it. I used my b:\music_shell folder which has 38 folders.
- Double-click the zipall.bat.
- A DOS window will open that it looks like this:
- Ignore the warning: WARNING: The system cannot find the file specified. ûtzip
- As it processes, you will start to see a .zip file for each folder:
- It will run for a long time. You will not want to be making changes to the files in the folder you are running this in because then you won’t really have a good backup of it.
And here's the funny thing - following the above steps does not create a backup - it creates .zip files and a 'snapshot' but those .zip files need to be moved to a different external hard drive or to the Cloud or someplace else in order to have an authentic backup.
Now that the DOS batch file is complete, I see this in my b:\music_shell folder:
I am also using a DOS batch file for my RoboHelp projects.
No comments:
Post a Comment