How do I batch rename a specific file inside multiple zip archives via the command line?

Posted by user73469 on Ask Ubuntu See other posts from Ask Ubuntu or by user73469
Published on 2012-06-26T23:46:35Z Indexed on 2012/06/27 3:23 UTC
Read the original article Hit count: 163

Filed under:

I have about 200+ shareware files in zip format that each contain a file called "FILE_ID.DIZ". I need to know how to rename each instance to lowercase "file_id.diz" without doing it manually - I've already gone that route and it's pretty time consuming. That file has to be lowercase because the BBS program I'm using ignores the FILE_ID.DIZ as a description since it is uppercase. If I manually change it to lowercase, the description is imported successfully.

I know that rar has a renaming switch, but then I'd have to batch convert all of the zip files to rar, and then back to zip. I'm not ruling that out entirely, but it seems like the long way around to resolving this.

I found the man page for "zip_rename", which looks like it might do the trick, but I have no idea how to actually implement it.

I refuse to do this on a Windows machine - I just can't and won't do it... it's the principle ;).

Anyway, thanks for your time!

© Ask Ubuntu or respective owner

Related posts about zip