Windows Legacy OS forum

Resolved Question

problem with DOS xcopy

by Penmere / December 30, 2012 7:42 PM PST

I use xcopy for backing up but the following bat file:

pause
xcopy C:\Temp\ G:\Temp\ /e/s/f/d/y
pause

gives me an 'invalid path' error.
Both the directories exist and there is one file in C:\Temp.
I would be grateful for any help here.

Penmere has chosen the best answer to their question. View answer
Answer This Ask For Clarification
Discussion is locked
You are posting a reply to: problem with DOS xcopy
The posting of advertisements, profanity, or personal attacks is prohibited. Please refer to our CNET Forums policies for details. All submitted content is subject to our Terms of Use.
Track this discussion and email me when there are updates

If you're asking for technical help, please be sure to include all your system info, including operating system, model number, and any other specifics related to the problem. Also please exercise your best judgment when posting in the forums--revealing personal information such as your e-mail address, telephone number, and address is not recommended.

You are reporting the following post: problem with DOS xcopy
This post has been flagged and will be reviewed by our staff. Thank you for helping us maintain CNET's great community.
Sorry, there was a problem flagging this post. Please try again now or at a later time.
If you believe this post is offensive or violates the CNET Forums' Usage policies, you can report it below (this will not automatically remove the post). Once reported, our moderators will be notified and the post will be reviewed.

All Answers

Best Answer chosen by Penmere

Collapse -
Either remove ...
by Edward ODaniel / December 31, 2012 9:57 AM PST
In reply to: problem with DOS xcopy

that trailing backslash or change it to:

xcopy C:\Temp\*.* G:\Temp\*.* /s/e/f/d/y

Collapse -
Answer
Forgive me for asking
by lacsr / December 30, 2012 7:52 PM PST
In reply to: problem with DOS xcopy

But files in the C:\Temp are not normally what someone would be looking to backup. That folder is usually used by the system to run downloads and other non-permanent files before they actually install, etc. Most cleanup software will delete the items from the temp folder, as it is considered trash. So, why copy that to another location?

Collapse -
problem with DOS xcopy
by Penmere / December 30, 2012 8:16 PM PST
In reply to: Forgive me for asking

Thanks for your reply. I tried to copy the Temp folder just as a test case. If I change the name of the folder I get the same error.

Collapse -
Answer
(NT) Did you it without the trailing back slash?
by R. Proffitt Forum moderator / December 31, 2012 2:18 AM PST
In reply to: problem with DOS xcopy
Collapse -
problem with DOS xcopy
by Penmere / December 31, 2012 6:11 PM PST

Thanks for your reply - and it worked. I will be able now to get on and write my backup file . Thanks again.

Collapse -
Answer
problem with DOS xcopy
by Penmere / December 31, 2012 6:15 PM PST
In reply to: problem with DOS xcopy

Thanks for your reply - both solutions worked. I will be able now to get on and write my backup file . Thanks again.

Popular Forums
icon
Computer Help 49,613 discussions
icon
Computer Newbies 10,349 discussions
icon
Laptops 19,436 discussions
icon
Security 30,426 discussions
icon
TVs & Home Theaters 20,308 discussions
icon
Windows 10 360 discussions
icon
Phones 15,802 discussions
icon
Windows 7 7,351 discussions
icon
Networking & Wireless 14,641 discussions

Smartphone tip

Hoarding photos on your phone?

Those picture are hogging memory and could be slowing down your phone.