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
How To...  Delete a 0K File? (Read 2629 times)
rdillard
YaBB Newbies
*
Offline


I love YaBB 1G - SP1!

Posts: 1
How To...  Delete a 0K File?
Mar 16th, 2004 at 5:05am
 
Does anyone know how I could delete a 0K file?  Purpose being, we use Watch Directory to monitor a set of folders we place files in that are then FTPd to customers.  Once WatchDirectory notices a file in a specific folder, it starts a FTP program with a specific set of parameters for the customer but we would prefer that the first step be to see if there is actually anything in the file or not.

Thanks for your help,
Robert
Back to top
 
 
IP Logged
 
Gert
YaBB Administrator
*****
Offline



Posts: 2239
The Netherlands
Re: How To...  Delete a 0K File?
Reply #1 - Mar 16th, 2004 at 12:45pm
 
Hello Robert,

If you use the .bat file WDAutoFtp.bat, that is installed with watchDirectory, please find the following line:

Code:
:FtpTheFile
 



And change it to
Code:
:FtpTheFile
IF %WD_FILE_SIZE% EQU 0 (
   DEL "%WD_FILE%"
   GOTO :Quit
)
 


This checks for a file of size zero. If you, for example, want to check for files with a size less than 1000 bytes, use the next code fragment instead:
Code:
:FtpTheFile
IF %WD_FILE_SIZE% LSS 1000 (
   DEL "%WD_FILE%"
   GOTO :Quit
)
 



If you are not using wdautoftp.bat as the basis for your .bat file, or are unsure how to implement this, please zip your .bat file and sent it to support at gdps.dk and I will change it for you.

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
 
Page Index Toggle Pages: 1