Automating a file renaming inside a zip file

English support forum

Moderators: Hacker, petermad, Stefan2, white

Post Reply
Jon Canale
Member
Member
Posts: 142
Joined: 2003-02-07, 12:54 UTC

Automating a file renaming inside a zip file

Post by *Jon Canale »

I tried to search for something, but there were too many hits that didn't help.

I'd like to automate renaming a readme.txt file within a zip file that looks like:

Readme.txt
SomeUtility.exe
SomeUtility.chm

to:
SomeUtility_Readme.txt
SomeUtility.exe
SomeUtility.chm

I've been doing it manually for years. There must be an easier way, but I don't quite know how to do it. The AHK guru's are going to say this is trivial, I'm sure.

Can somebody give me a hint?

Thanks.
User avatar
ZoSTeR
Power Member
Power Member
Posts: 1052
Joined: 2004-07-29, 11:00 UTC

Post by *ZoSTeR »

You could use 7-Zip (I tested with 9.30) for that:

New button with Command:

Code: Select all

%comspec% /k c:\tmp\7z.exe
Parameter:

Code: Select all

rn %Z%P Readme.txt %Z%O_Readme.txt
Adjust the path to 7z.exe

Now inside the archive select SomeUtility.exe and hit the button. The exe name will be appended to the readme.txt

Remove the "%comspec% /k" and select "Run minimized" to hide the CMD box when everthing works ok.
Jon Canale
Member
Member
Posts: 142
Joined: 2003-02-07, 12:54 UTC

Post by *Jon Canale »

Worked great after I dl'd a the 9.30 version of 7zip. Thanks!
Post Reply