none
Robocopy file parameter not working properly (intermittently)

    Question

  • Hi,

    I am trying to use robocopy to move outdated files to a new folder, here is the script I used:

    robocopy ".\ori_folder" ".\archive_folder\2007" "200710*.*" "200711*.*" "200712*.*" /MOV /r:3 /w:10 /sec /log+:"Archive_2007_file.log"

    I expect the script will only move files with name begin with "200710" or "200711" or "200712",

    however, some files not meeting the criteria also been moved...

    you can see from the below result log that in the end of the file list, files begin with 2011 and 2012 also being copied.

    this symptom occurs intermittently,  with the same pool of files in the source folder, sometimes the script works fine, but sometimes the same script will move unexpected files.

    Is there anything wrong with my script? 

    -------------------------------------------------------------------------------

      Started : Tue Feb 18 13:44:40 2014

       Source : S:\ori_folder\
         Dest : S:\archive_folder\2007\


        Files : 200710*.*
       200711*.*
       200712*.*
       
      Options : /COPY:DATS /MOV /R:3 /W:10 

    ------------------------------------------------------------------------------

    ...

    ...

       New File    136588 20071121_HV0000_S_DSTR.xml
    100%  
       New File     21617 20071226_000000_S_JREC.xml
    100%  
       New File    422878 20071226_000000_S_SMON.xml
    100%  
       New File     19601 20071226_000000_S_TREC.xml
    100%  
       New File      2247 20071227_000000_S_SPHL.xml
    100%  
       New File       527 20111106_S20000_S_ASUM.xml
    100%  
       New File       319 20120105_S10000_S_DWST.xml
    100%  


    Wednesday, February 19, 2014 2:33 AM

Answers

All replies