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

[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!


Written by falcon1986

24 November, 2013 at 9:44 PM

Posted in Software

Tagged with ,

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out /  Change )

Google+ photo

You are commenting using your Google+ account. Log Out /  Change )

Twitter picture

You are commenting using your Twitter account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )

Connecting to %s

%d bloggers like this: