viSci Posted April 7, 2011 Report Share Posted April 7, 2011 Just wondering if there is an easier way to do this. The only way I can see to rename a file in a ZLIB is to uncompress the whole thing, rename and then rebuild the archive. Thanks Quote Link to comment
viSci Posted April 7, 2011 Author Report Share Posted April 7, 2011 For anyone interested...here is what I came up with, a variation of the ZLIB Delete vi which uses the Move Raw vi to transfer each file in the archive to a temp archive without having to decompress and re-compress, very clever! Instead of deletion by omission, I simply rename the identified file. It still seems like there should be a way to do this directly within the original archive, but this will do for now. Quote Link to comment
Jim Kring Posted April 8, 2011 Report Share Posted April 8, 2011 For anyone interested...here is what I came up with, a variation of the ZLIB Delete vi which uses the Move Raw vi to transfer each file in the archive to a temp archive without having to decompress and re-compress, very clever! Instead of deletion by omission, I simply rename the identified file. It still seems like there should be a way to do this directly within the original archive, but this will do for now. This seems like a good solution. There might be some low-level way to modify the name of a file in a zip archive, but I don't know off hand. Quote Link to comment
Rolf Kalbermatter Posted April 8, 2011 Report Share Posted April 8, 2011 This seems like a good solution. There might be some low-level way to modify the name of a file in a zip archive, but I don't know off hand. Sorry, this method doesn't really exist as far as I know. The archive directory is embedded in the actual file stream and modifying it without modifying the entire file structure seems not very easy. The structure does allow adding new entries to the archive without complete rewrite of the archive, but deleting and modifying is another beast. I may have missed something but as far as I know using the same aproach as the ZLIB Delete File function is really the best there is. Quote Link to comment
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.