Page 1 of 1

Move files of certain file size

Posted: Sun Jul 17, 2011 5:07 pm
by rolltidega
Can Robotask be setup to monitor for files that are written to a folder and then move files that are 20Mb or greater to a different folder?  I have syslog files that come in and the files stop writing with they reach 20 M.  I tried a file watcher but the files as they write to the monitored folder are locked until the complete, yet Robotask somehow grabs part of the file and moves it, grabbing the rest later when the monitor runs.  I just assume that I would have less file duplicate issues if I move based n file size every so many minutes or something.  If anyone can help me with this I would appreciate it.  Thanks...

Move files of certain file size

Posted: Mon Jul 18, 2011 5:46 am
by Oleg
Yes, it's possible.
Monitor the changes of files by File Monitor trigger.

In the task you should process files in the loop.
File loop can retrieve file size too
If you know file names beforehand you can use {FileSize()} system variable

In order to accelerate operation, do the following:
- move file to another folder on the same disk. This is instant operation regardless of file size, because this is rename only in fact
- next you can spend any time to copy moved files to desired folder.

Move files of certain file size

Posted: Mon Jul 18, 2011 9:30 am
by rolltidega
Can you provide me with an example of how to use file loop to move files based off size  Thanks...

Move files of certain file size

Posted: Mon Jul 18, 2011 10:44 am
by Oleg
See this task. This example detects files more 1 000 000 bytes in "c:\incoming" folder

Save the task into the file and use menu Task | Import in order to import into RoboTask.