in reply to Re: PERL backup routine
in thread PERL backup routine

Thanks for the response: Here's the system call I've been trying to make (to NT/2K). $sourcedir = "J:/sortdata/sortsafe/probers/prbrsort/EG_ROOT/PRODUCTS"; $timestamp = ($targetdir.$date); mkdir ($timestamp) || die "Cannot mkdir $targetdir: $!"; @args = ("xcopy $sourcedir $timestamp"); system(@args) == 0 || die "Cannot xcopy @args"; I'll play a bit more the the ftp stuff; have already installed net::ftp, but may have proxy issues... Thanks again PH

Replies are listed 'Best First'.
Re: Re: Re: PERL backup routine
by zigster (Hermit) on Jan 18, 2001 at 14:39 UTC
    Use code tags to ensure your code is formatted correctly. Here is your code nicely formatted:
    $sourcedir="J:/sortdata/sortsafe/probers/prbrsort/EG_ROOT/PRODUCTS"; $timestamp=($targetdir.$date); mkdir ($timestamp) || die "Cannot mkdir $targetdir: $!"; @args = ("xcopy $sourcedir $timestamp"); system(@args) == 0 || die "Cannot xcopy @args";
    What error are you having? How do you set $date? Check out System for details of how to call system What you are doing is fine and dandy but I believe the intent is ("xcopy",$sourcedir,$timestamp). Does anyone else know why this is and what difference it makes?

    I would recomend printing @args and try running the command by hand to see if your command is correctly formatted.
    --

    Zigster