Transfer of EFS-encrypted files from Server 2003 to Server 2012 system, failing.

I'm using Robocopy to transfer a fairly large number of files from a Server 2003 system to a Server 2012 system that will be replacing it (both DCs, and using Administrator account). The robocopy command I'm using is fairly basic, just robocopy "\\oldserver\fileshare" "\\newserver\fileshare" /E

I've found that there are a few stray folders/files in the structure on this 2003 server that are encrypted with EFS (green text), and Robocopy hangs on those with the "Waiting 30 seconds" message. I'm not completely familiar with EFS, so I'm not sure how to handle this. As a test, I tried deleting a couple of the files, and that actually works, and Robocopy continues on. But so far, that seems to be the only thing I can do. I can't access, move, or rename the files, only delete them.

The tricky part about this is that...only a few files in each folder are encrypted like this, but the directory structure is pretty huge (we're talking about an A folder that has A-Z folders in it, then a B folder that has A-Z folders in it, and each of those A-Z folders has folders 1-50 in it, etc). Then A\B\C\A\1\24 will have some random encrypted file in it that makes Robocopy stop what it's doing.

When I look at the "Users who have access to this file" section on one of the files, I see a domain\username that doesn't exist at this site to the best of my knowledge (I believe it's from an old domain that the previous IT company decommissioned at some point).

Is there some way to get around this so Robocopy can continue properly transferring these files? The only thing I've found to do is delete the affected files, which will allow Robocopy to bypass them and move on, but I obviously don't want to do that. I'd like to be able to do this without having to sit and watch Robocopy like a hawk for something that's making it hang as it copies half a million files over the network. Was kind of hoping to kick this off last night and have it done (or at least a good chunk of the way there) this morning, but I woke up and checked it to find that it had been stuck on some directory since about 10 minutes after I left it last night.

I have tried taking ownership of the affected files (which I can do) and giving Administrator full control, but that's not working either (I can take ownership, but then attempting to give Administrator full control results in an access denied). Although I can decrypt folders, just not files. So if I see a folder in green text, I can just go to properties and remove the encryption check, and it works. On those individual files in them, I get an access denied error.
jhighwindAsked:
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.

David Johnson, CD, MVPOwnerCommented:
robocopy sourcdir destinatindir /e /r:0 /w:0 /xn /log:c:\logs\robocopy.log /TEE /sec /zb /efsraw

/efsraw copy all encrypted files in EFS RAW mode
/r:0 - retry 0 times
/w:0 wait 0 seconds
/zb - backup mode restartable
/xn - exclude newer on destination
/log create a log file
/tee both log and show on standard output (screen)

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
jhighwindAuthor Commented:
That did it. My "fix" at first was to simply delete the "problem" files on the old server and let robocopy skip them, but I restored them from the recycle bin and used the above command to copy them over. It actually ended up not being a lot overall, but we were talking something like 500-600 scattered across this huge directory structure.

@David: thanks for the response. Saved me a good bit of time and stress.
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
Windows Server 2003

From novice to tech pro — start learning today.