WatchDirectory home page
WatchDirectory Startseite (Deutsche Version)
Site WatchDirectory (Français)
  Welcome, Guest. Please Login or Register
YaBB - Yet another Bulletin Board
Page Index Toggle Pages: 1
Auto Delete files of a size (Read 3597 times)
YaBB Newbies

Posts: 1
Auto Delete files of a size
Jul 18th, 2007 at 8:44pm
Ok, have seen several topics close to this question, but the each appear to differ slightly in a material way so I thought I would ask my specific question. 

I am running a bat file which queries data and produces a file into a specific directory.  The size of the file created is dependant on the result of the query.  I need to delete (as soon as it's created) every file of less than a certain size.

I saw the size variable available for functions other than delete.  Can anyone help me get this done?
Back to top
IP Logged
YaBB Administrator

Posts: 2270
The Netherlands
Re: Auto Delete files of a size
Reply #1 - Jul 19th, 2007 at 3:06pm

There is no option to select only files of a certain size. However, what you can do is make use of the environment variables that watchDirectory creates before it runs your batch script (see for the complete list). Then let WD run a .bat file for all new files, and let the batch script delete files based on their size.
For example:

The above deletes all files smaller or equal to 1024 bytes.

Back to top

Gert Rijs - gert (at) gdpsoftware (dot) com
End Alzheimer's:
WWW WWW GdPSoftware  
IP Logged
Page Index Toggle Pages: 1