Hello all!
I put together this script to tar a bunch of directories off a NT 4.0
server. The script runs on a Win 2000 Pro workstation with 128 MB of RAM. It
runs out of memory while it's processing the last directory and aside from
creating the tar in memeory I don't see any other way of doing it among the
methods listed.
Any help would be greatly appreciated.
Jack Sheppard
Sr. Eng. Specialist
[EMAIL PROTECTED]
------>
use File::Find;
use Archive::Tar;
use warnings;
@dirs = qw(
A206C206
A206C228
A206C360
A206C361
A206C396
A206C906
A206C907
A314A929
A314A930
A322A379
A557A133
);
$name = "f:/temp/test";
foreach $dir (@dirs)
{
find(\&jprint, $dir);
}
sub jprint ()
{
$file = "$File::Find::name";
push(@files, $file);
}
# make tar
$tar = Archive::Tar->new();
foreach $doc (@files)
{
if (!-d $doc)
{
print "Adding $doc\n";
$tar->add_files("$doc");
}
}
# write, and finish
$tar->write("$name.tar");
print "\nArchive $name.tar created.";
_______________________________________________
Perl-Win32-Admin mailing list
[EMAIL PROTECTED]
To unsubscribe: http://listserv.ActiveState.com/mailman/mysubs