Solved

Access denied when copying over \home\%username% directories using Robocopy

Posted on 2013-12-30
3
388 Views
Last Modified: 2013-12-30
I am trying to copy over redirect profile directories \home\%username% from a 2008 Server R2 to a CIFShare on a NAS using Robocopy while applying the /e switch.  Everything copies ok except for folders that have the lock sign over the folder.  When trying to copy these the program echoes "access denied wait 30 seconds" and just repeats indefinitely. I realize these are currently being used by other users.
My question is does Robocopy have a switch or function in it that will allow these type of files/folders to be copied regardless of being in use or locked?

thank you
0
Comment
Question by:Matt_Kennedy
3 Comments
 
LVL 17

Expert Comment

by:pjam
ID: 39746889
I am not a Robocopy user, but in my humble opinion you definitely do not want to try and copy an open or locked file. Most like will cause corruption to the file.
0
 
LVL 29

Accepted Solution

by:
serialband earned 500 total points
ID: 39747303
Robocopy can't copy files or folders that are in use.  If you use robocopy, you'll need to work around that by just running more frequent robocopies and set the retry and warnings to a much lower number.  I usually set them to 1 so I can more easily spot the errors and bypass the wait.

robocopy e:\home\%username%  f:\home\%username% /w:1 /r:1 /copyall /mir


You can run robocopy later and it will quickly pick up the missed files.

Also, robocopy runs as the user running the command.  You should probably do a runas /User:Administrator if you want access.  Unfortunately, some users remoev administrator access, so you may still have to add it back.

Assuming you have files that stay permanently inuse, this work around won't help you.  If you don't want to wait for the inuse files, you can use an open sourced 3rd party tool called hobocopy and turn on Volume Shadow Copy (VSS).  Hobocopy makes use of the shadow copy to copy files that are inuse, bypassing the limitation.  You will be getting an older copy of the file, but at least you'll get the file.  http://hobocopy.sourceforge.net/
0
 

Author Closing Comment

by:Matt_Kennedy
ID: 39747413
Thank you serialband.   That did the job!
0

Featured Post

PRTG Network Monitor: Intuitive Network Monitoring

Network Monitoring is essential to ensure that computer systems and network devices are running. Use PRTG to monitor LANs, servers, websites, applications and devices, bandwidth, virtual environments, remote systems, IoT, and many more. PRTG is easy to set up & use.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

I had a question today where the user wanted to know how to delete an SSL Certificate, so I thought that I would quickly add this How to! Article for your reference. WHY WOULD YOU WANT TO DELETE A CERTIFICATE? 1. If an incorrect certificate was …
A procedure for exporting installed hotfix details of remote computers using powershell
This tutorial will show how to configure a new Backup Exec 2012 server and move an existing database to that server with the use of the BEUtility. Install Backup Exec 2012 on the new server and apply all of the latest hotfixes and service packs. The…
With the advent of Windows 10, Microsoft is pushing a Get Windows 10 icon into the notification area (system tray) of qualifying computers. There are many reasons for wanting to remove this icon. This two-part Experts Exchange video Micro Tutorial s…

860 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question