shetlandbob
Programmer
Hi,
I think I'm having a bit og a mind blank, the following code doesn't do what I expect, any ideas why?
When I run it in a console window I expected it to show the current directory, change to the "MyDir" directory, print the dir path and then list all files in the dir.
However the line in bold doesn't work, the console doesn't change dir? The dir does exist and the err value = 0.
Any ideas what I'm doing wrong?
Thanks
Robert Cumming
I think I'm having a bit og a mind blank, the following code doesn't do what I expect, any ideas why?
Code:
sprintf ( text, "cd C:\\Program Files\\MyDir" );
err = system ( "cd" );
[b]err = system ( text );[/b]
err = system ( "cd" );
err = system ( "dir" );
However the line in bold doesn't work, the console doesn't change dir? The dir does exist and the err value = 0.
Any ideas what I'm doing wrong?
Thanks
Robert Cumming