Overview
Examples
Screenshots
Comparisons
Applications
Download
Documentation
Tutorials
Bazaar
Status & Roadmap
FAQ
Authors & License
Forums
Funding Ultimate++
Search on this site
Search in forums












SourceForge.net Logo
Home » U++ Library support » U++ Core » problem with system() under windows [SOLVED]
problem with system() under windows [SOLVED] [message #20867] Wed, 15 April 2009 11:49 Go to next message
forlano is currently offline  forlano
Messages: 1185
Registered: March 2006
Location: Italy
Senior Contributor
Hello,

I need to call an external .bat file with two arguments from my Upp application.

My app built the String commandline before before to pass it to
system(commandline).

The problem: system(commandline) does not work.

But if I save the content of the string commandline I get

C:\upp20081\out\MINGW.Gui\plugin\javafo.bat C:\VegaTornei\CopiadirdcA08\ rdcA08.kxf


then I copy it in a DOS shell and at the return key the command is performed very well. So, the string is built correctly but system() does not operate correctly.

Perhaps "String" class collide with system()? Is there an Upp method to perform the same thing?

I tried to use CreateProcess() but the compiler cry for problem about conversion with Upp string.
Any idea?
Thanks,
Luigi

[Updated on: Wed, 15 April 2009 13:46]

Report message to a moderator

Re: problem with system() under windows [message #20869 is a reply to message #20867] Wed, 15 April 2009 13:24 Go to previous messageGo to next message
masu is currently offline  masu
Messages: 378
Registered: February 2006
Senior Member
Have you already tried using \\ instead of \ ?

Matthias
Re: problem with system() under windows [message #20871 is a reply to message #20869] Wed, 15 April 2009 13:46 Go to previous message
forlano is currently offline  forlano
Messages: 1185
Registered: March 2006
Location: Italy
Senior Contributor
masu wrote on Wed, 15 April 2009 13:24

Have you already tried using \\ instead of \ ?

Matthias


Hi Matthias,

yes, I tried but the problem was elsewhere. Inside the .bat file there was another file path dependent and the SO was not able to lacate it. This stupid bug costed me 4 hours Embarassed .

Thanks,
Luigi
Previous Topic: [REQUEST] GetDriveName function for Path.h
Next Topic: [REQUEST] IsHidden for POSIX platforms
Goto Forum:
  


Current Time: Sat Apr 20 00:23:21 CEST 2024

Total time taken to generate the page: 0.05591 seconds