Falcon1986-Online

Home of a med student who likes to manage websites and talk tech!

Posts Tagged ‘7zip

[HOW-TO] ZIP multiple files/folders to individual archives

leave a comment »

fix-iconSome time ago, my aunt asked me if I could recover some photos stored on her old laptop and forward them along to her. I could have sent them by Dropbox, but that would take some time to set up remotely on her new laptop. Since there were hundreds of images, I needed a way of compressing multiple folders containing several files for upload to the cloud. The simple but difficult method was going through each folder and manually executing archive creation with 7Zip, but that would take too long. I then discovered this neat little batch script that does the job with a simple double-click.

In the folder containing the subfolders that you want compressed, create a batch file, paste this in the contents and save:

for /d %%X in (*) do "c:\Program Files\7-Zip\7z.exe" a "%%X.zip" "%%X\"

The script uses the folder names as the file names and places the ZIPs at the same level as the folder. Execute by double-clicking on the batch file. Simple!

Advertisements

Written by falcon1986

24 November, 2013 at 9:44 PM

Posted in Software

Tagged with ,