robocopy file exception

I have one particular file that is always open and stops my robocopy backup every night.
Is there a way to tell robocopy to copy it anyway or to skip this one file all together?
thanks
GoHuskersAsked:
Who is Participating?

[Product update] Infrastructure Analysis Tool is now available with Business Accounts.Learn More

x
I wear a lot of hats...

"The solutions and answers provided on Experts Exchange have been extremely helpful to me over the last few years. I wear a lot of hats - Developer, Database Administrator, Help Desk, etc., so I know a lot of things but not a lot about one thing. Experts Exchange gives me answers from people who do know a lot about one thing, in a easy to use platform." -Todd S.

strivoliCommented:
Use /W:1 /R:1 switches.
First one tells robocopy to wait 1 second.
Second one tells robocopy to retry 1 time.

I use this 2 switches to get rid of locked files.
GoHuskersAuthor Commented:
I do use those switches now but it still stops after retry limit is reached
Joseph DalyCommented:
You may want to try adding in the /XF switch.

/XF file [file]... : eXclude Files matching given names/paths/wildcards.

It might take a little playing around but with this switch you should be able to exclude the problem file by name.

Experts Exchange Solution brought to you by

Your issues matter to us.

Facing a tech roadblock? Get the help and guidance you need from experienced professionals who care. Ask your question anytime, anywhere, with no hassle.

Start your 7-day free trial
Protecting & Securing Your Critical Data

Considering 93 percent of companies file for bankruptcy within 12 months of a disaster that blocked access to their data for 10 days or more, planning for the worst is just smart business. Learn how Acronis Backup integrates security at every stage

strivoliCommented:
If you have 100 files and 53rd is locked, robocopy does the job til 52nd. When it is the 53rd turn, robocopy tries 1 time for 1 second. If it does not get unlock (because the user/app closed the file) in that time, robocopy skips 53rd and proceeds from the 54th till the last one.
That is how robocopy works.
GoHuskersAuthor Commented:
         New File                  2277      debug.log
2011/12/08 20:19:24 ERROR 32 (0x00000020) Copying File D:\<folders>\debug.log
The process cannot access the file because it is being used by another process.

What would the syntax be? /XF file D:/<folders>/debug.log  ?
strivoliCommented:
/XF "d:\folders\debug.log"
Maen Abu-TabanjehNetwork Administrator, Network ConsultantCommented:
reboot your machine and try again
Maen Abu-TabanjehNetwork Administrator, Network ConsultantCommented:
good luck , am glad to hear that your problem has been solved
It's more than this solution.Get answers and train to solve all your tech problems - anytime, anywhere.Try it for free Edge Out The Competitionfor your dream job with proven skills and certifications.Get started today Stand Outas the employee with proven skills.Start learning today for free Move Your Career Forwardwith certification training in the latest technologies.Start your trial today
Storage Software

From novice to tech pro — start learning today.