Do you have a question? Post it now! No Registration Necessary.  Now with pictures!

Threaded View
I have problem with executing external programs...
The code:
    system("/home/pkunzip /arch.zip /3");
Does not work properly (nothing doeing)...

The code:
    system("dir /w");
Working very-very good

Re: exec


Quoted text here. Click to load it

 Check the return code and any error messages or warnings output.


Quoted text here. Click to load it

 Although opendir() / readdir() would be more portable.

 It looks like you're on Windows given the names (?); but you haven't specified
drive letters in the paths, are you sure they're on the right drive?

<http://www.andyhsoftware.co.uk/space Space: disk usage analysis tool

Re: exec

vantala wrote:
Quoted text here. Click to load it

Are you on Linux? If you're running Windows, that code won't work -
because Windows' directory structure doesn't work like that, you need to
specify a path with drive letter, etc.

If you're on Linux, make sure you have an executable file called pkunzip
in the /home directory and that the file you're trying to unzip,
'arch.zip' is in the /, or root, directory.

Jasper Bryant-Greene
Cabbage Promotions

Site Timeline