Sample I-Spy Filters
This filter list will only retain items that contain .txt; thus, likely text files with the ".txt" suffix.
#+
.txt
Such a filter list will discard all items that contain .zip or .bin; thus, likley ignoring zipped or binary files while keeping the rest.
#-
.zip
.bin
Lacking a tag (#- or #+) on the first line, all entries of this filter list will be treated as omit filters; thus, only items not containing patterns below will be retained.
nwt
art
per
00
#!/usr/bin/perl
# List filter.pl; an example list filter for the Eudora beta directory at Qualcomm
# This script extracts lines containing files from a directory dump
#
# 12/22/95 Version 1.0
# This script is free, public domain, no strings attached.
# Igor Livshits
$argumentCounter= 0;
$openToWrite= "> ";
$newLineDelimiter= "\n";
$spaceDelimiter= " ";
$realFileTag= "-r";
# Read in the arguments passed to us by the caller
#
$sourceFile= $ARGV[$argumentCounter++];
$targetFile= $ARGV[$argumentCounter++];
# Extract just the file names
#
open(sourceFile, $sourceFile) || die "Cannot open $sourceFile: $!";
open(targetFile, $openToWrite . $targetFile) || die "Cannot open $targetFile: $!";
while ($aLine= )
{ # Scan the input file line by line
if ($aLine =~ /^$realFileTag/)
{ # Data files are listed on lines that start with a -r
@aLine= split($spaceDelimiter, $aLine); # File names do not contain spaces
print (targetFile (pop(@aLine))); # And the last such item is the file path and name
}
}
close(sourceFile);
close(targetFile);
Return to the table of contents or to the discussion of filters.
ISL [12/27/95]