eXoRt Posted May 13, 2008 Share Posted May 13, 2008 Hi everyone,I work in a compagny as the IT ressource person, my coworkers asked me for a software that could batch rename the file names into a .zip. I found tons of software that batch rename all types of files but not within .zip archives !Any help would be goodThanks,eXoRt Link to comment Share on other sites More sharing options...
radigast Posted May 13, 2008 Share Posted May 13, 2008 (edited) jv16 PowerTools 2008 can do that. You can check it out for yourself here. It will install as a trial version.If you go under the "File Tools" tab and click on "File Tool", you can then search for all the files. you want to change. Under "More functions", choose the "Rename..." option. It also does about 50 million other useful things, such as registry cleaning, registry compressiong, etc... Edited May 13, 2008 by radigast Link to comment Share on other sites More sharing options...
Smiley357 Posted May 14, 2008 Share Posted May 14, 2008 7ZIP can be used in a batch file to archive files to .zip. It is freeware. Here is a very simple example of how to archive all files in the directory to .zip.@echo offfor %%i in (*.*) do "C:\Program Files\7-Zip\7z.exe" a -tzip %%i.zip %%i -rthis is a very simple example and will even archive the batch file since it has to be in the directory it is searching. Link to comment Share on other sites More sharing options...
DigeratiPrime Posted May 14, 2008 Share Posted May 14, 2008 Welcome to MSFN eXoRt It sounds to me like you want to rename files within a zip archive, not create new zip archives. I know this can be done by batch extracting/renaming/archiving but there may be a more direct solution. Link to comment Share on other sites More sharing options...
eXoRt Posted May 14, 2008 Author Share Posted May 14, 2008 Welcome to MSFN eXoRt It sounds to me like you want to rename files within a zip archive, not create new zip archives. I know this can be done by batch extracting/renaming/archiving but there may be a more direct solution.It's exactly what I want to do. batch extracting the files and archving them back again is not an option. They need to do that on about 600 zip files that contain 200 files each. Link to comment Share on other sites More sharing options...
Smiley357 Posted May 14, 2008 Share Posted May 14, 2008 Humm.. thats a good question. I'm not sure how to rename files that are already archived without extracting them. Link to comment Share on other sites More sharing options...
DigeratiPrime Posted May 14, 2008 Share Posted May 14, 2008 So far:Rename files inside of archive. This command is supported for RAR and ZIP formats. The command syntax is:winrar rn <arcname> <srcname1> <destname1> … <srcnameN> <destnameN>For example, the following command:WinRAR rn data.rar readme.txt readme.bak info.txt info.bakwill rename readme.txt to readme.bak and info.txt to info.bak in the archive data.rar.It is allowed to use wildcards in the source and destination names for simple name transformations like changing file extensions. For example:WinRAR rn data.rar *.txt *.bakwill rename all *.txt files to *.bak.WinRAR does not check if the destination file name is already present in the archive, so you need to be careful to avoid duplicated names. It is especially important when using wildcards. Such command is potentially dangerous, because a wrong wildcard may corrupt all archived names.Then for example you could:for %%i in (*.zip;*.rar) do "%PROGRAMFILES%\WinRAR\WinRAR.exe" rn %%i *.dat *.txt Link to comment Share on other sites More sharing options...
eXoRt Posted May 15, 2008 Author Share Posted May 15, 2008 So far:Rename files inside of archive. This command is supported for RAR and ZIP formats. The command syntax is:winrar rn <arcname> <srcname1> <destname1> … <srcnameN> <destnameN>For example, the following command:WinRAR rn data.rar readme.txt readme.bak info.txt info.bakwill rename readme.txt to readme.bak and info.txt to info.bak in the archive data.rar.It is allowed to use wildcards in the source and destination names for simple name transformations like changing file extensions. For example:WinRAR rn data.rar *.txt *.bakwill rename all *.txt files to *.bak.WinRAR does not check if the destination file name is already present in the archive, so you need to be careful to avoid duplicated names. It is especially important when using wildcards. Such command is potentially dangerous, because a wrong wildcard may corrupt all archived names.Then for example you could:for %%i in (*.zip;*.rar) do "%PROGRAMFILES%\WinRAR\WinRAR.exe" rn %%i *.dat *.txtGreat Tip Thanks! But what if I need to find and replace only a couple of characters in the filename. Does winrar has some kind of cvar for that ? Link to comment Share on other sites More sharing options...
DigeratiPrime Posted May 16, 2008 Share Posted May 16, 2008 can you give us an example of what you are trying to accomplish? Link to comment Share on other sites More sharing options...
thebigdog Posted November 24, 2008 Share Posted November 24, 2008 HiI came across this post when trying to google for an answer to my problem. eXort has the same problem I have.What I need is a program that will search zip files for any .jpg file with the symbol "#" in the file name and remove it without unzipping, renaming and then re-zipping againi.e. find [*#*.jpg] file within [*.zip] file and remove the "#" symbol.For example: file#1.jpg into file1.jpg within fileX.zipI have thousands of zip files which are full of jpg images, some have a "#" symbol in the name, some don't.Any help guys? Link to comment Share on other sites More sharing options...
CoffeeFiend Posted November 24, 2008 Share Posted November 24, 2008 You won't find an app that does exactly that out of the box, it's too much of a niche market (it's probably like just you two guys out there with that specific need).You'd have to write a script that lists files inside each zip file, and if any file has the characters you don't want in it, it uses an external app like winrar to rename them one by one. Or "outsource" to someone that will write it for you... If you have that much data to process, and that it's of any importance to you, you shouldn't mind paying someone a few bucks (on a site like rentacoder or whatever) to do it for you, or spending time to learn to use tools to accomplish it.Just saying, if you want a tool that does that out of the box, you most likely (as in 99.999% sure) won't find one. Link to comment Share on other sites More sharing options...
Recommended Posts
Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
Register a new accountSign in
Already have an account? Sign in here.
Sign In Now