Robocopy and file in use problem

  • Good morning-

    I recently inherited a package that does numerous things. One of the steps uses Robocopy to copy a large output file to another server for further processing. The next step then renames that file in preparation for archiving it elsewhere. The last two weeks the package has failed with the same error on the Rename file step (cannot access file x as it is being used by another process). This is, at the very least, annoying.

    Apart from moving things around, does anyone have any suggestions?

    Thanks,

    Jason

  • You may check which process is using that file using Process Explorer. Also you can add a WAIT/SLEEP value so that there is delay between robocopy and copy file process.

    Pradeep Adiga
    Blog: sqldbadiaries.com
    Twitter: @pradeepadiga

  • Instead of using a File System task, use a script task containing appropriate code. It works much better, in my experience and requires just three or four lines of code.

    If you haven't even tried to resolve your issue, please don't expect the hard-working volunteers here to waste their time providing links to answers which you could easily have found yourself.

Viewing 3 posts - 1 through 2 (of 2 total)

You must be logged in to reply to this topic. Login to reply