in reply to PERL backup routine

Explain what the problem is as clearly as you can and I am sure there are people here that will be able to help.
--

Zigster

Replies are listed 'Best First'.
Re: Re: PERL backup routine
by phathead22 (Novice) on Jan 17, 2001 at 22:36 UTC
    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
      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