in reply to Problems executing a copy command on win32

If you read the docs on the exec command, it says:
The "exec" function executes a system command and never returns-- use "system" instead of "exec" if you want it to return.
Basicly, exec replaces your process with the one you are execing, so you never make it back to your loop.

Replies are listed 'Best First'.
Re: Re: Problems executing a copy command on win32
by DaWolf (Curate) on Jan 14, 2004 at 22:26 UTC
    Damn me, I'm really sorry.

    I've just took a glance on exec syntax and specification. Downvote me, I deserve it.

    Now a legitimate question: both files are empty (they were created by another app I've made that just creates an Excel document), so they are 0 Kb each.

    Windows refuses to copy them as if they don't exist. Is there a workaround for this?

    Thanks and sorry again,

    Thanks, Paladin.

    my ($author_nickname, $author_email) = ("DaWolf","erabbott\@terra.com.br") if ($author_name eq "Er Galvão Abbott");
      Now a legitimate question: both files are empty (they were created by another app I've made that just creates an Excel document), so they are 0 Kb each.

      Windows refuses to copy them as if they don't exist. Is there a workaround for this?

      P:\test>md test P:\test>copy con test\fred ^Z 1 file(s) copied. P:\test>dir test Directory of P:\test\test 14/01/2004 22:32 0 fred 1 File(s) 0 bytes P:\test>md test2 P:\test>copy test\fred test2 1 file(s) copied. P:\test>dir test2 Directory of P:\test\test2 14/01/2004 22:32 0 fred 1 File(s) 0 bytes

      ?


      Examine what is said, not who speaks.
      "Efficiency is intelligent laziness." -David Dunham
      "Think for yourself!" - Abigail
      Timing (and a little luck) are everything!

        Here it dies:

        1 file(s) copied.
        Unable to copy abc.xls. Error: No such file or directory

        my ($author_nickname, $author_email) = ("DaWolf","erabbott\@terra.com.br") if ($author_name eq "Er Galvão Abbott");