PDA

View Full Version : Enhanced Zip - Including folder but not entire path


abc123
01-18-2013, 04:12 PM
Directory structure:
E:\Stuff\FolderIWant\SubFolders

I want to Zip up FolderIWant so that when I unzip, it includes FolderIWant and all its contents, but does not create a Stuff folder also.

What I'm currently trying is using E:\Stuff for the source folder and /FolderIWant in the Include: list. However, this is taking an extremely long time to process and I'm testing with very small files\folders so I believe it is the search for the folder in Include that is taking so long.

Any ideas on speeding up my current process or an entirely different way to do this efficiently?

kinook
01-18-2013, 04:26 PM
One option: Copy or move the folder to be zipped into a temporary location (i.e., E:\Stuff\FolderIWant\SubFolders -> %TEMP%\work\Stuff\FolderIWant) and zip the temporary Stuff folder instead (ensuring that no other folders exist under the temp %TEMP%\work\Stuff folder).

abc123
01-18-2013, 04:31 PM
Thanks for the quick reply.

I've used that process and it works fine, but occasionally these folders contain a significant amount of data and copying to another location and then zipping adds quite a bit of time to the process so I was hoping to find something a little more efficient.

kinook
01-18-2013, 04:40 PM
Create a symbolic link rather than moving/copying.
http://technet.microsoft.com/en-us/library/cc753194%28v=ws.10%29.aspx