Results 1 to 5 of 5
How can I rename a file inside a zip archive without extracting and repacking the whole zip. I didn't find anything useful in the zip and 7z man pages (or ...
- 08-14-2011 #1Just Joined!
- Join Date
- Aug 2011
- Posts
- 7
rename file in zip archive
How can I rename a file inside a zip archive without extracting and repacking the whole zip. I didn't find anything useful in the zip and 7z man pages (or I am just blind).
And it needs to be doable from the command line because in need it in a script. So a gui tool won't do.
Thanks.
- 08-15-2011 #2Just Joined!
- Join Date
- Aug 2011
- Posts
- 7
For now, I am using a package called fuse-zip to mount a zip, rename files inside the zip and unmount again. It actually works pretty well. But I would still prefer a a tool that would do it without mounting/mounting, because it's a bit cumbersome.
- 08-15-2011 #3Linux Guru
- Join Date
- May 2011
- Posts
- 1,842
Have you checked out zipnote? It should come with the zip package - at least it is part of the zip package in Fedora/Red Hat.
- 08-15-2011 #4Just Joined!
- Join Date
- Aug 2011
- Posts
- 7
Thanks atreyu. That was exactly what I was looking for. The usage is a bit weird but efficient. For example:
Code:echo -e "@ oldfilename\n@=newfilename" | zipnote -w test.zip
- 08-15-2011 #5Linux Guru
- Join Date
- May 2011
- Posts
- 1,842
and thanks for sharing an example of the squirrelly syntax - i didn't bother trying to figure it out!


Reply With Quote