WatchDirectory Forum
http://www.watchdirectory.net/cgi-bin/yabb25/YaBB.pl
watchDirectory forums >> How to... >> preserve subdirectory structure when using wzzip
http://www.watchdirectory.net/cgi-bin/yabb25/YaBB.pl?num=1090087412

Message started by daved on Jul 18th, 2004 at 2:03am

Title: preserve subdirectory structure when using wzzip
Post by daved on Jul 18th, 2004 at 2:03am
Hi Gert,
 I am currently evaluating watchDirectory and I am interested in the AutoZip feature.  Is there any way to preserve the directory within the zip archive when a file is added?  For example, if I update a file named test.txt in c:\temp\test file\ and I allow the WDAutoZip.bat file to run, it adds test.txt to the zip archive but the path is lost (ie. \temp\test file\).  Is there any way to preserve this?  I have looked at wzzip documentation, but I think it has something to do with using %WD_FILE%.

Any suggestions?

Thanks,
Dave

btw - I love what I've seen so far!!  ;D

Title: Re: preserve subdirectory structure when using wzz
Post by Gert on Jul 18th, 2004 at 2:48pm
Dave,

According to the WZZIP reference, you should add the -P command line option. This will store the complete path (excluding the drive-letter) into the archive.

So, below the :FILENEW label in your .bat file, it should read:

Code (]
"%WINZIPDIR%\wzzip" -P "%ZIPDIR%\%WD_FILE_N%.ZIP" "%WD_FILE%"
[/code):


And, below the :FILEUPD label:
[code]
"%WINZIPDIR%\wzzip" -u -P "%ZIPDIR%\%WD_FILE_N%.ZIP" "%WD_FILE%"


This is tested and works with the latest WinZip (9.0).

Hope this helps,
Gert

Title: Re: preserve subdirectory structure when using wzz
Post by daved on Jul 18th, 2004 at 10:51pm
Gert,
 Thanks for the speedy reply!! I am leaning towards licensing the product, we would most likely be using it at work for some of our projects.

Thanks again!

Dave

WatchDirectory Forum » Powered by YaBB 2.5.2!
YaBB Forum Software © 2000-2017. All Rights Reserved.