Discussions

How to script RoboCopy to omit ntuser files when copying user files?

+
0 Votes
Locked

How to script RoboCopy to omit ntuser files when copying user files?

TinkRbelle
I all,

I have RoboCopy and use a specific script to copy data files to my external backup drive. But, I also want to back up my User folder files as well. The problem I am having is that when it comes to the ntuser.dat, ntuser.DAT and ntuser.ini files it will hang and not go any further, as these files will not copy. Is there a way that I can adjust copy script to ignore these any ntuser files so that it won't hang up the backup?

The current script that I am using is listed below, with the necessary changes in the user and file names, but, I think that most can still get the gist of the script function. Please note that the script wrap.
robocopy c:\\Users\username\Documents g:\\usernameDocs /MIR /V /TEE /LOG:"e:\<foldername>\Backup usernameDocs\foldernameBelle64Backuplog.txt"

What might I add and where to have the process skip or ignore these ntuser files:
ntuser.DAT
ntuser.dat
ntuser.ini
ntuser.dat.LOG1
ntuser.dat.LOG2

These are the files that I need to be able to bypass in the backup so that it will not kill the process. This script is running and works well until it gets to the above files and then it hangs.

Any suggestions, information or references would truly be very much appreciated. :-)