Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations IamaSherpa on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

xcopy in script file

Status
Not open for further replies.

oscarin

Technical User
Mar 12, 2003
11
ES
How can I:

1. Force xcopy to do not stop itself when it find files in use (I want it to continue copying the remaining files).

2. Run my script in such way that it can copy all files (with system account or something so) independently of permisions.

Thanks a lot
 
1. You could try using xcopy with the /C switch, which tells xcopy to continue even if it encounters errors.

2. What are you trying to achieve with your script? Would using something like this help:

net use g: \\remote\thefolder PASSWORD /user:"DOMAIN\USERNAME"

specifying a user account which has the necessary permissions.
 
I want to perform a backup of a directory called "redirections" which contains redirect desktop and my documents folders of all users. xcopy does not copy the contents of this folders so I thought it is running without permisions.
 
Are you running this xcopy 'backup' as a Scheduled Task? If so, you need to ensure that the 'Run as' user information contains details of a user who has permissions to the files you want to copy (in the DOMAIN\USERNAME) format. If it isn't working then give the user the necessary permissions to the files.

Are you sure the files aren't in use while you're trying to copy them, which may cause problems? Are you using the /Y switch with the xcopy command to confirm overwrites? Send the output of the xcopy command to a log file, this may tell you where it is going wrong.
 
Just a suugestion - try using Winzip with the command line utility WZZIP - I use this as it seems to cope with files in use.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top