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 SkipVought on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

xcopy syntax help 1

Status
Not open for further replies.

tekistry

Technical User
Aug 13, 2002
61
0
0
GB
Hi I am using the below xcopy command in a batch file to copy the contents of the users desktop to a location on their 'H' drive:

xcopy "C:\Documents and Settings\user.domain\Desktop"*.* /e/I/H/R/Y H:\desktop-backup

Problem is that it ends up copying all of the users documents and settings, not just the desktop.
I know it is a small syntax error, but can't see it.
Any ideas?
Thanks

---------------------------------------
save a life - visit:
 
I have just checked again -
It only copies directories, I need it to copy all the files !
Any ideas?

---------------------------------------
save a life - visit:
 
I would try this:

Code:
xcopy "C:\Documents and Settings\user.domain\Desktop\*.*" H:\desktop-backup /E /L /H /R /Y

D
 
xcopy "C:\Documents and Settings\user.domain\Desktop" "H:\desktop-backup" /E /H /I /R /Y

Cliff, CCNA/MCSE/MCSA 2000
Network Administrator
 
Doh!

Thanks - Techy69 -
I didn't deserve that help, it has just made me lazy :eek:)
Nick

---------------------------------------
save a life - visit:
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top