The Perl Toolchain Summit needs more sponsors. If your company depends on Perl, please support this very important event.

NAME

ziprecent.pl

SYNOPSIS

  ziprecent h:/myperl

  ziprecent h:/myperl -e pl pm -d 365

  ziprecent h:/myperl -q 

  ziprecent h:/myperl h:/temp/zip/file1.zip 
 

DESCRIPTION

This script helps to collect recently modified files in a source directory into a zip file (new or existing).

It uses Archive::Zip.

ziprecent h:/myperl

Lists and zips all files more recent than 1 day (24 hours) in directory h:/myperl and it's subdirectories, and places the zip file into default zip directory. The generated zip file name is based on local time (e.g. 20001208-231237.zip).

ziprecent h:/myperl -e pl pm -d 365

Zips only .pl and .pm files more recent than one year.

ziprecent h:/myperl -msvc

Zips source files found in a typical MSVC project.

ziprecent h:/myperl -q

Lists files that should be zipped.

ziprecent h:/myperl h:/temp/zip/file1.zip

Updates file named h:/temp/zip/file1.zip (overwrites an existing file if writable).

ziprecent -h

Prints the help text and exits.

 ziprecent.pl <dir> -d <days> [-e <ext> ...]> [-h] [-msvc] [-q] [<zippath>]
 Zips files in source directory and its subdirectories
 whose file extension is in specified extensions (default: any extension).
    -d <days>       max age (days) for files to be zipped (default: 1 day)
    <dir>           source directory
    -e <ext>        one or more space-separated extensions
    -h              print help text and exit
    -msvc           may be given instead of -e and will zip all msvc source files  
    -q              query only (list files but don't zip)
    <zippath>.zip   path to zipfile to be created (or updated if it exists)

BUGS

Tested only on Win2k.

Does not handle filenames without extension.

Does not accept more than one source directory (workaround: invoke separately for each directory, specifying the same zip file).

AUTHOR

Rudi Farkas rudif@lecroy.com rudif@bluemail.ch

SEE ALSO

perl ;-)