Computing.Net > Forums > Windows XP > Creating a batch file (back up)

Computer Problems? Computing.Net has over 1,000,000 posts about all things technology related! Over 90% answered within 24 hours! Click here to start participating now! Also, be sure to check out the New User Guide.

Creating a batch file (back up)

Reply to Message Icon

Name: Death_Knight
Date: October 30, 2008 at 11:04:25 Pacific
OS: WinXP
CPU/Ram: 2Gig
Product: built
Comment:

I am using this line in the batch file and it prompts me if I want the File (F) or Directory (D), I just want to copy a batch file that wont' prompt and copy the destination and source directly without me press anything beside executing the batch file.

xCOPY "M:\ABS\Main.mdb" "C:\database\Main.mdb"



Sponsored Link
Ads by Google

Response Number 1
Name: Mechanix2Go
Date: October 30, 2008 at 12:57:23 Pacific
Reply:

xCOPY M:\ABS\Main.mdb C:\database\


=====================================
If at first you don't succeed, you're about average.

M2


0

Response Number 2
Name: Death_Knight
Date: October 30, 2008 at 13:54:20 Pacific
Reply:

Assume that I have a space in a folder name without the quotes it won't work.


0

Response Number 3
Name: wanderer
Date: October 30, 2008 at 13:56:06 Pacific
Reply:

which is why you would use the quotes. Your question was?

McCain:
steal from the poor/middle class and give to the rich

Obama:
steal from the rich and give to the poor/middle class. Go Obama!


0

Response Number 4
Name: Mechanix2Go
Date: October 31, 2008 at 00:12:48 Pacific
Reply:

"Assume that I have a space in a folder name without the quotes it won't work."

Correct. But in the example given there are no spaces.

The general solution to avoiding that prompt is to use the trailing backspace.

In this instance, xcopy is bringing nothing to the party. You can just as well use:

COPY M:\ABS\Main.mdb C:\database

The value of xcopy is it's ability to replicate directory structures, copy only files newer than..., copy only existing etc. This is not a case of that.


=====================================
If at first you don't succeed, you're about average.

M2


0

Response Number 5
Name: Death_Knight
Date: October 31, 2008 at 06:10:16 Pacific
Reply:

Ya that was just one example I do have some files I want to copy and they have space between name therefore I need the quote. Is there a work around for this?


0

Related Posts

See More



Response Number 6
Name: wanderer
Date: October 31, 2008 at 06:54:52 Pacific
Reply:

what is your problem with using the quotes?

No there is no "workaround" unless you use *.file extension instead of a specific file name.

Without the quotes the file is looked at as having something extra whereas in quotes its looked at as a whole string and handled accordingly.

McCain:
steal from the poor/middle class and give to the rich

Obama:
steal from the rich and give to the poor/middle class. Go Obama!


0

Sponsored Link
Ads by Google
Reply to Message Icon

sound off and on laptop Windows unstable w/ 2gb m...



Post Locked

This post is quite old and has been locked from receiving new replies. Please create a new posting instead.


Go to Windows XP Forum Home


Sponsored links

Ads by Google


Results for: Creating a batch file (back up)

Creating a batch file in XP www.computing.net/answers/windows-xp/creating-a-batch-file-in-xp/48561.html

Need help creating a batch file www.computing.net/answers/windows-xp/need-help-creating-a-batch-file/172372.html

creating a batch file www.computing.net/answers/windows-xp/creating-a-batch-file/180531.html