-1

I'm trying to copy files from one folder to another via xcopy in my C++ application.

The command outputs : "Invalid number of parameters"

here is the code:

system("xcopy H:\Temp\Configurations C:\temp\TSE /E");

If i try the same command directly in the command prompt, it works perfectly. It just does not work when i call it from my c++ code.

Rana
  • 1,675
  • 3
  • 25
  • 51

1 Answers1

0

The following works:

system("\"xcopy H:\\Temp\\Configurations C:\\temp\\TSE\"");

Thanks to @MartinBa

Explanation here, Thank @Nacho for the link

Community
  • 1
  • 1
Rana
  • 1,675
  • 3
  • 25
  • 51