Take the 2-minute tour ×
Super User is a question and answer site for computer enthusiasts and power users. It's 100% free, no registration required.

I have the following pipeline:

  • [other vendor] sends files to my Windows filesystem, which are indexed starting with the next unused number (normally file.001)
  • I move the files with RoboCopy to my Unix filesystem and process them. After processing I remove the files. So these files are just for transportation of the data.

The problem is: while slowly processing the file, the [other vendor] may send new files (starting again with file.001), and RoboCopy is then replacing the files on my Unix system with the newer files (which is the behaviour, RoboCopy was intended for).

Is there any way to suppress this behaviour? Something like "leave the file.001 on the Windows filesystem and try again in a minute"?

EDITH:

normally:

  • Windows:empty Unix:empty => FileDelivery
  • Windows:file.001 Unix:empty => Robocopy
  • Windows:empty Unix:file.001 => slowly process to database
  • Windows:empty Unix:empty

here is the problem:

  • Windows:empty Unix:empty => FileDelivery
  • Windows:file.001 Unix:empty => Robocopy
  • Windows:empty Unix:file.001 => slowly process to database and FileDelivery
  • Windows:file.001 Unix:file.001 => DON't move file.001 (but maybe other files)

robocopy c:\data\ r:\data\ *. * /XN /MOV /R:100 /W:30 /MON:1 is replacing the unix:file.001 even if it is present

Edith wants me to add this:

maybe the problem lies in the different "filesystems"/administration levels. The one is netlink (elder samba) and the other is zfs. both "systems" (sorry i have not the slightest idea of network technology, so my terminology may be wrong) seam to keep their own directory of inodes in memory, so one does not recognise the changes, the other filesystem is performing to the directory.

share|improve this question

1 Answer 1

I think the /xo /xn switches will not replace older or newer files of the same name. Then have a scheduled task to run every, say, 5 minutes to try again

share|improve this answer
    
i am not sure how that helps? The Files are just for transporting their content, so they will be moved from the windows filesystem (which the other vendor can access) to the unix filesystem (where the database residues) and deleted whence they are processed into the database. So normaly there is no "newer" or "older" file present. –  Peter Miehle Dec 21 '11 at 8:34
    
@PeterMiehle ... In your question, you're mentioning file.001, file.002, etc. Adding the /XO option makes it so that if there is a file there with the same name, older time stamp (and /XN for newer), it does NOT copy. So you set this to run every so often to process –  Canadian Luke Dec 21 '11 at 17:09

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.