WatchDirectory home page
WatchDirectory Startseite (Deutsche Version)
Site WatchDirectory (Français)
  Welcome, Guest. Please Login or Register
YaBB - Yet another Bulletin Board
   
  HomeHelpSearchLoginRegister  
 
Page Index Toggle Pages: 1
It hits, it Zips! (Read 3093 times)
adamu
YaBB Newbies
*
Offline


I love YaBB 1G - SP1!

Posts: 2
It hits, it Zips!
Jan 18th, 2005 at 2:36pm
 
Hi - just looking to find a solution to a request I have had.

We have an archive drive which contains data in the same structure as the regular drive, however the archive drive is running out of space!

We have found a file type which is common within our company which has a HUGE compression rate, as such zipping them saves lots of room. 

The WatchDirectory solution for command line zipping is perfect with one exception.  The bat file showing this feature sets the location for the zipped files as another set location (e.g. D:\Zipped).  What I’m after though is the file type to be zipped up and left in the same location it was found.  Once zipped the original file will be deleted.

If this makes no sense let me know!

Any help very much appreciated.
Thanks
Adam.
Back to top
 
 
IP Logged
 
Gert
YaBB Administrator
*****
Offline



Posts: 2225
The Netherlands
Re: It hits, it Zips!
Reply #1 - Jan 18th, 2005 at 4:17pm
 
Hello Adam,

If I understand you correctly...

You monitor (for example): C:\Data
You have the ZIPDIR variable set to D:\Zipped

Now, when the file c:\data\sub\hello.txt is created, you want hello.zip be made in D:\Zipped\sub instead of D:\Zipped.

Correct?

Easy, find the line that says
Code:
SET ZIPDIR=D:\Zips
 


And add the following below it:
Code:
IF "%WD_RELDIR%" NEQ "" SET ZIPDIR=%ZIPDIR%\%WD_RELDIR%
MKDIR "%ZIPDIR%"
 



WD_RELDIR always contains the directory-name, relative to the monitored directory. In my example above, it would contain sub.

Hope that helps,
Gert


Back to top
 

Gert Rijs - gert (at) gdpsoftware (dot) com
Blog: http://blog-en.gdpsoftware.com/
End Alzheimer's: http://www.alz.org&&...
WWW WWW GdPSoftware  
IP Logged
 
Gert
YaBB Administrator
*****
Offline



Posts: 2225
The Netherlands
Re: It hits, it Zips!
Reply #2 - Jan 18th, 2005 at 4:18pm
 
By the way, if it is only for one filetype, have a look at this help-page: http://www.watchdirectory.net/watchDir/help/ignore.html
It shows you how you can let watchDirectory only monitor for certain filetypes.

Gert
Back to top
 

Gert Rijs - gert (at) gdpsoftware (dot) com
Blog: http://blog-en.gdpsoftware.com/
End Alzheimer's: http://www.alz.org&&...
WWW WWW GdPSoftware  
IP Logged
 
adamu
YaBB Newbies
*
Offline


I love YaBB 1G - SP1!

Posts: 2
Re: It hits, it Zips!
Reply #3 - Jan 18th, 2005 at 4:32pm
 
Gert, that is perfect!   Cheesy

Many thanks.
Adam.
Back to top
 
 
IP Logged
 
Page Index Toggle Pages: 1