My PERL program uses the File::Find routine to find files that match a
certain description, and then build a file that contains a list of these
filenames.
Later I pass that file with the list of filenames to an archive program,
invoked via the system function.
The File::Find puts the names into the $filetab with forward slashes. On
NT, the archive program isn't prepared to handle filenames with forward
slashes instead of backslashes, so says it cannot find the files.
Can anyone help with a snip of code to either change how the filenames are
written out to filetab in the first place? or else read in $filetab and
modify all the slashes to backslashes before the archive program is invoked?
any more elegant ideas on how to get the correct filenames to the archive
program are appreciated.
Here's a few of the variables I'm using (everything that gets passed to the
archive command on the NT platform has to be changed to backslahes instead
of slashes), along with the File::Find snip and the system command.
$filetab="$localdir/arch.lst";
$bpfiletab="$localdirbp\\arch.lst";
open (FILETAB, ">${filetab}") or die ("Cannot open $filetab \n");
use File::Find;
find sub {print FILETAB "$File::Find::name\n" if (!-d && m/S.{7}\.LOG$/)},
"${logdir}";
close FILETAB;
# start the archive command
system "$bpcommand -c $bpclass -s $bpsched -L $bplog -f $bpfiletab ";
Thanks!
--
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]