vietboy505
Technical User
Windows side doesn't have tar or gtar right?
I am trying to write the script to copy directory or file to a destination. I think it's on my Windows side is not working.
Everything before the code is right, I think it's the tar part it not working? how can I fix it to work on the Windows side or both for UNIX & Windows?
I am trying to write the script to copy directory or file to a destination. I think it's on my Windows side is not working.
Code:
$TAR = "/usr/local/bin/gtar"; #gtar is there on the unix side
$opt = "";
#where $source & destdir is define earlier
$c = "cd $source; $TAR -" . $opt . "Scvf - . | (cd $destdir; $TAR -SxBpf - )";
printf($c);
system($c);