|
Re: copy file to folder that has spaces in name
|
CChris
|
Jun 26, 2008 01:00 PDT
|
posted by: CChris <christian.cuvier at ag??culture.gouv.fr>
llamedoso wrote:
| |
Hi,
I want to do the following:
system("copy c:\\mystuff\\afile.txt c:\\windows\\documents and settings\\administrator\\desktop")
This fails because of the spaces in documents and settings.
Have searched the forum without any luck.
Is there a solution?
Thank you
|
system("copy \"c:\\mystuff\\afile.txt\" \"c:\\windows\\documents and settings\\administrator\\desktop\"")
At the console prompt, you'd surround the file paths with quotes, so you need to insert double quotes into the Eu string. That's what \" syands for.
CChris
|
|
 |
|