2

I need to move files from one directory to another on a daily basis.
robocopy seems to be suitable but my problem is the files are made during some time (spectroscopy raw data) and I need to check that all files are complete. There are no specified file size or writing duration which I can use as a condition. The only option I see is checking files' sizes if those are permanent.
Can I use robocopy for this task? If not, would you kindly point me towards solution?

  • So you are MOVING the files and not copying them, correct? Something like `ROBOCOPY "c:\sourcefolder" "e:\destfolder" /MOV /S` (might change out `/S` with `/E` in your testing). I've never tested it with "in-use" files with the `/MOV` switch. Can you have the "spectroscopy raw data" just be copied to this location once it's done capturing, etc. and have the near real-time files in another location temporarily until that process releases the file or creates a new one to use? Wasn't sure what flexibility you have with this regard so just an idea. – Pimp Juice IT Oct 06 '16 at 00:41
  • Thank you for your answer and let me elaborate a bit. In the source directory will be only one file as everything else supposed to be moved before by script or manually. I need to check the size of this file, say, every five minutes, and move it to the destination folder if file is complete, that is, size is not changed from last check. – Eugene Vlasov Oct 06 '16 at 14:51
  • 1
    I think that using file modification time instead file size is more useful. – Mikhail Khirgiy Oct 06 '16 at 15:07
  • Thanks, Mikhail I just do not understand what timestamp file has if it is still writing. Is it actual time when {dir} is called? – Eugene Vlasov Oct 06 '16 at 16:25

0 Answers0