Tom's Guide | Tom's Hardware | Tom's Games
![]() |
![]() |
![]() |
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"

xCOPY M:\ABS\Main.mdb C:\database\
=====================================
If at first you don't succeed, you're about average.M2

which is why you would use the quotes. Your question was?
McCain:
steal from the poor/middle class and give to the richObama:
steal from the rich and give to the poor/middle class. Go Obama!

"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

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?

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 richObama:
steal from the rich and give to the poor/middle class. Go Obama!

![]() |
sound off and on laptop
|
Windows unstable w/ 2gb m...
|

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