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
Do not copy empty files (i.e. file size = 0kb) (Read 3371 times)
stevieD
YaBB Newbies
*
Offline



Posts: 6
Do not copy empty files (i.e. file size = 0kb)
Aug 4th, 2011 at 10:12pm
 
It seems like it should be easy to configure but I'm not able to figure it out.  How can I tell it to ignore empty files?  I'm using the Sort Files to Multiple Folders seup.  Thanks
Back to top
 
 
IP Logged
 
Gert
YaBB Administrator
*****
Offline



Posts: 2238
The Netherlands
Re: Do not copy empty files (i.e. file size = 0kb)
Reply #1 - Aug 5th, 2011 at 8:15am
 
Hi,

Currently this is not an option but there are work-arounds...
I wonder... Those empty files, are they currently being written to (being created) and are you actually saying the task is copying the files too soon? In that case make sure to experiment with the "wait for files" setting: http://www.watchdirectory.net/wdhelp/help/wdnewconfigpage6.html

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: 2238
The Netherlands
Re: Do not copy empty files (i.e. file size = 0kb)
Reply #2 - Aug 5th, 2011 at 12:31pm
 
I am thinking about implementing something that is a lot more flexible....

On the Filter Events window ( http://www.watchdirectory.net/wdhelp/help/filter_events.html ), allow you to set a batch script to be called. The script should "reply" by writing Y (process the file) or N (ignore this file) to determine if the file should be processed.
The script can use all variables explained here: http://www.watchdirectory.net/wdhelp/plugins/wdopAutoRunBatEnv.html

If we implement this, you could use something like this script:
Code:
;
; a filter script that checks the size of a detected file.
; this script filters out files of zero size, larger files are processed
;
IF %WD_FILE_SIZE% EQU 0 GOTO :SayNo
GOTO :SayYes

:SayYes
ECHO Y > "%WD_FILTERFILE%"
GOTO :EOF


:SayNo
ECHO N > "%WD_FILTERFILE%"
GOTO :EOF
 



I will see if this can be implemented in a new beta (this weekend or next week).
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
 
Page Index Toggle Pages: 1