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
Move files based on size (Read 2471 times)
zorba
YaBB Newbies
*
Offline



Posts: 5
Move files based on size
Mar 28th, 2006 at 11:04pm
 
Hi,
Just wanted to know if it was possible to move file's based on there size. I wanna move say files that are <500K to one directory and >=500K to another directory.

Michael
Back to top
 
 
IP Logged
 
Gert
YaBB Administrator
*****
Offline



Posts: 2224
The Netherlands
Re: Move files based on size
Reply #1 - Mar 29th, 2006 at 2:59am
 
Hi,

Yes that is possible, but you will need to write a .bat script for that.

Something like this:
Code:
if %WD_FILE_SIZE_KB% GEQ 500 GOTO :BigFile

rem so it is smaller than 500kb
COPY "%WD_FILE%" D:\Temp\Smallfiles
GOTO :EOF

:BigFile
COPY "%WD_FILE%" D:\Temp\BigFile
GOTO :EOF
 



Use the run a batch file plugin to start this script for new files. See environment variables for a list of %VARIABLES% you can use in your scripts.

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