puzzling error in script that copies files before processing them

Discussion in 'Perl Misc' started by Ted, Jul 12, 2006.

  1. Ted

    Ted Guest

    I have a script that copies certain files before processing them. Here
    is what I have tried:

    # $copy_cmd = "copy $holdings_source $holdings_dest";
    # qx/$copy_cmd/;
    copy( $holdings_source, $holdings_dest ) or die "Copy failed: $!";

    # $copy_cmd = "copy $transactions_source $transactions_dest";
    # qx/$copy_cmd/;
    copy( $transactions_source, $transactions_dest ) or die "Copy failed:
    $!";


    In one trial, I used the set of statements that are commented out, and
    in the second, I use the other two. The result is the same.

    Parameter format not correct - "FVA".
    Parameter format not correct - "FVA".

    Obviously, there is one error statement for each attempt to copy a
    file.

    The contents of the variables holding the file names are:

    holdings destination file = C:/FVA/data/univeris/IGBPRODS.txt
    transactions destination file = C:/FVA/data/univeris/IGBTRANS.txt

    holdings source file =
    C:/FVA/data/univeris/univeris0608/IGBPRODS.053006.txt
    transactions source file =
    C:/FVA/data/univeris/univeris0608/IGBTRANS.053006.txt

    The path "C:/FVA/data/univeris" is read from a configuration file, so I
    have the script print the file names just so I can ensure the computed
    file names are correct (which they are).

    Of course, at the beginning of the script I have the following:
    use warnings "all";
    use File::Copy;

    What makes this especially puzzling is that I have similar code in
    another script, and it uses the same configuration file, and it works
    fine.

    Any ideas as to what has gone awry, and how to fix it?

    Thanks,

    Ted
     
    Ted, Jul 12, 2006
    #1
    1. Advertising

Want to reply to this thread or ask your own question?

It takes just 2 minutes to sign up (and it's free!). Just click the sign up button to choose a username and then you can ask your own questions on the forum.
Similar Threads
  1. Replies:
    0
    Views:
    515
  2. dwalter
    Replies:
    9
    Views:
    1,277
    Roedy Green
    Oct 31, 2005
  3. Anonieko

    HttpHandlers - Learn Them. Use Them.

    Anonieko, Jun 15, 2006, in forum: ASP .Net
    Replies:
    5
    Views:
    562
    tdavisjr
    Jun 16, 2006
  4. why the lucky stiff
    Replies:
    5
    Views:
    169
    why the lucky stiff
    Sep 22, 2004
  5. Eric Promislow
    Replies:
    4
    Views:
    235
    Eric Promislow
    Oct 31, 2006
Loading...

Share This Page