system("runfile") open bracket problem

Hello everyone,

Sorry if this has been answered before. I've tried searching for at least 20 minutes before coming here.

Basically the line is:

run = system("C:\\Dev-Cpp\\export(test).xls");
This however doesn't run the file. The system seems to stop reading the path string right before the open bracket "(" in "(test)". It says the "C:\\Dev-Cpp\\export" is not a valid path/file. Hence it stops reading when it runs into the open bracket "(".

I did a workaround and renamed the file to export-test.xls and it worked. But why does is not recognize the open bracket? Nothing urgent, just very curious why this is happening.

I'm using DevC++ in Windows XP.

Thanks
¿Does that work in the console?
run = system("C:\\Dev-Cpp\\export\(test\).xls");
try this.
ne555: Ah I see. Yes, when I try to run C:\Dev-Cpp\export(test).xls in windows cmd prompt, it gives me the same message, stops reading at the bracket.

anirudh sn: I've tried that and I still get the same message as above. It still stops reading at the bracket.

Looks like this is a windows cmd issue, nothing wrong with C++ related stuff.

Edit: Aafter some searching, looks like the character for cmd prompt is ^, hence this worked:

"C:\Dev-Cpp\export^(test^).xls"

Thanks guys.
Last edited on
Topic archived. No new replies allowed.