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
Copy files less than 24 hrs old (Read 467 times)
brewha
YaBB Newbies
*
Offline



Posts: 1
Copy files less than 24 hrs old
Sep 10th, 2016 at 7:47pm
 
In the 4.9.4 ver there is an option to process an event by running a batch script to "make the final decision". I need that script to make the final decision be "File age is 24hrs or less". Can someone tell me how to create the batch script please?
Back to top
 
 
IP Logged
 
Gert
YaBB Administrator
*****
Offline



Posts: 2225
The Netherlands
Re: Copy files less than 24 hrs old
Reply #1 - Sep 11th, 2016 at 8:38am
 
Hi,

Something like this should work for the script:
Code:
rem based on the creation date of the file, you can also use
rem WD_AGEMODIFIED_HOURS to use the modification date.

IF %WD_AGECREATED_HOURS% LEQ 24 GOTO :SayYes
GOTO :SayNo

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

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

 

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