Friday, March 19, 2010

some things are just simple and work....
(from the output of dir /s /ad /b - feed it through the script below)

open (IN,$ARGV[0]) || die "Can't open $file! $! \n";

while ()
{
$line0 = $_;
chop $line0;

print "cd \"$line0\"\n";
print "forfiles \/D -31\/12\/2007 \/C \"cmd \/c if \@isdir\=\=FALSE 7z a -mx7 \@fname.zip \@fname.\@ext\"\n";
print "forfiles \/D -31\/12\/2007 \/C \"cmd \/c if \@isdir\=\=FALSE del \@fname.\@ext\"\n";
print "::\n";
}
close (IN);

No comments: