Reputation: 45
Im trying to move a picture in every zip folder in current directory. I searched online for some guidance on how to do it using batch (.bat) and the only solution I figured out is to make a macro of it but it takes too long for it to complete.
Edit: I have 50 zip folders which I want to add a picture inside each one in a faster way other than draging the picture each time inside each of the 50 zip folders.
I would appreciate any other ideas and help you could offer.
Upvotes: 2
Views: 1328
Reputation: 1
You can package files into a zip file using the Winzip utility. It must be installed on your computer. Follow these steps:
Upvotes: 0
Reputation: 65313
Adds (or updates) README.txt
in the zipfiles foo.zip
and bar.zip
from README.txt
in the current directory:
$ for f in foo.zip bar.zip ; do zip -u $f README.txt ; done
Upvotes: 0
Reputation: 41234
Test this on some sample zip files in a test folder. It assumes 7-zip is in the folder shown.
It's not so much faster as it is easier, without manually manipulating the files.
The actual zipping speed will be pretty much the same.
@echo off
for /f "delims=" %%a in ('dir *.zip /b /a-d') do (
"C:\Program Files\7-Zip\7z.exe" a "%%a" "my-picture.jpg"
)
pause
Upvotes: 3