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.
Automating a file renaming inside a zip file
Moderators: Hacker, petermad, Stefan2, white
-
- Member
- Posts: 142
- Joined: 2003-02-07, 12:54 UTC
You could use 7-Zip (I tested with 9.30) for that:
New button with Command:
Parameter:
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.
New button with Command:
Code: Select all
%comspec% /k c:\tmp\7z.exe
Code: Select all
rn %Z%P Readme.txt %Z%O_Readme.txt
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.
-
- Member
- Posts: 142
- Joined: 2003-02-07, 12:54 UTC