DOS Command

  • Thread starter Thread starter Marv
  • Start date Start date
M

Marv

I realize this may be off topic but I don't find any place to post it. I am
trying to do a DOS coy command that combines a number of files into single
one.

This syntax works if I am in the directory where the files are located:

Copy *.csv Prices.txt

But if I am in another folder and try to put a path to it like

copy C:\Finance\Mutual Funds\Get Prices\*.csv Prices.txt

It always says it cannot find the file. I KNOW the location IS correct. Is
there some error in the syntax that can cause this?

Thanks for any assistance.

Marv
 
Try putting quote marks around the parts (the space in Mutual Funds and Get
Prices is probably what is hurting you).
copy "C:\Finance\Mutual Funds\Get Prices\*.csv" "Prices.txt"

Michael
 
Michael Walraven said:
Try putting quote marks around the parts (the space in Mutual Funds and
Get Prices is probably what is hurting you).
copy "C:\Finance\Mutual Funds\Get Prices\*.csv" "Prices.txt"

Yeah, but he only needs the first pair of quotes, in that example.

ss.
 
I realize this may be off topic but I don't find any place to post it. I am
trying to do a DOS coy command that combines a number of files into single
one.

This syntax works if I am in the directory where the files are located:

Copy *.csv Prices.txt

But if I am in another folder and try to put a path to it like

copy C:\Finance\Mutual Funds\Get Prices\*.csv Prices.txt

It always says it cannot find the file. I KNOW the location IS correct. Is
there some error in the syntax that can cause this?

Thanks for any assistance.

Marv

Put quotes around the first part. DOS doesn't like long file names
or filenames with spaces in them.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Back
Top