I would like take files that are bigger than 2 gigs and split them into 2gb sections before being uploaded through the ftp plugin. But have it ignore files under 2 gigs and just have it upload them as they are. This is what I have so far using automatically start any program.

Should I be doing this with a .bat file instead, as I want the smaller files to be moved to the folder being watched for ftp uploads along with the files being archived? And what do I have to do to get it to split the larger files into 2GB parts? They can be .zip or .rar, as long as they are split into 2GB or smaller sections.

Hi,I was running this bat file as described above, but I wanted to just rar/zip the file if over 2GB in file size and files that aren't over 2GB just to be left in the original directory.Is there a command for this? cause at the moment the files that are smaller then 2GB are being moved to the directory where the rar/zip files are moved to.

CD = the directory to monitor for files that may need raring and SET OUTDIR the directory where the rar'd files are to be put.And if the original file size is smaller then 2000mb then leave as is do not rar or move. But if over 2000mb then rar and put rar'ed file into outdir but leave original file in CD directory.

ok,finally got around to testing this and it doesn't seem to be working.theres another process that renames and moves files to the "done" folder which is working, but the rar over 2gb filesize process says done in watchdirectory but nothing is happening.

CD = the directory to monitor for files that may need raring and SET OUTDIR the directory where the rar'd files are to be put.And if the original file size is smaller then 2000mb then leave as is do not rar or move. But if over 2000mb then rar and put rar'ed file into outdir but leave original file in CD directory.

code modified by Gert

Hi,The above quoted text is my code that I am using and it's not working.

I do not know what could be the issue (I didn't test your code), maybe a wrong command line option for rar?

The easiest way to see what could be happening.....Make sure the "Run a bat file" task has the option "Capture output" selected.Run the task, put a new file in the monitored directory so your script is calledstop the taskselect the menu "Tools -> View task directory" - this opens windows explorer, typically inside C:\ProgramData\WatchDirectorygo to the sub-directory with the same name as your taskThere you will find one outputxxxxx_yyyyy.log file for each time your script was called.

You may spot the error when you examine the contents of the most current logfile.

I think it may have to do with the "quotes" surrounding "%WD_FILE_SIZE_MB%", it causes the IF statement to do an alphabetical comparison instead of numerical. Remove the quotes and do NOT add WinRar.exe to the path - that won't work.