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.
 
Back
Top