I've tried the "-latest" command and it works fine although I need to upload files with a time duration (i.e. 24 hours). I've read that I could use "-filemask" but when I am executing .bat file, the script simply doesn't proceed. The cmd shows and closes immediately. Please help.
So do you run the script or the batch file?
Your batch file has quotes wrong.