user2951825
user2951825

Reputation:

Putting pairs of files into separate zip archives

I have in a single folder pairs of files with the same filename and different extension.

ex.:

I would like to select all those files and put the pairs in separate zip files.

ex.:

Is that even possible using 7-zip command line and a prepared batch file?

Upvotes: 0

Views: 827

Answers (1)

Jeremy Stein
Jeremy Stein

Reputation: 19661

Double the % to %% for use in a batch file.

FOR %f in (*.txt) DO 7za a "%~nf.zip" "%~nf.txt" "%~nf.docx"

Upvotes: 1

Related Questions