By using this site, you agree to our updated Privacy Policy and our Terms of Use. Manage your Cookies Settings.
445,898 Members | 2,039 Online
Bytes IT Community
+ Ask a Question
Need help? Post your question and get tips & solutions from a community of 445,898 IT Pros & Developers. It's quick & easy.

calling external files

P: 1
Hi its been a few years but i am sure i have done this before. i can easly call the file using


but if the path line becomes more complicated it stops because of the extra "" marks.

strcpy(Path,"xcopy "C:\\temp\\temp2.lnk" "C:\\Documents and Settings\\All Users\\Desktop\\" /Y /S /Q /C /K /R /d");

can someone tell me the way round this.
Jul 11 '06 #1
Share this Question
Share on Google+
1 Reply

Expert Mod 5K+
P: 8,916
Easy in the same way that you have escaped \ to \\ inside the string escape " to \"

Expand|Select|Wrap|Line Numbers
  1. strcpy(Path,"xcopy \"C:\\temp\\temp2.lnk\" \"C:\\Documents and Settings\\All Users\\Desktop\\\" /Y /S /Q /C /K /R /d");
Jul 11 '06 #2

Post your reply

Sign in to post your reply or Sign up for a free account.