[rochester-pm-list] Web Site update, meeting reminder
Charles Rishel
charles at mckeanmachinery.com
Mon Feb 14 14:59:27 CST 2000
Brian,
Sorry I only made the one meeting. I would like to attend more, but I have been rather busy with work and now the weather makes it not so nice
a drive. As I live in Olean, it is a bit out of the way ;-).
but, I wanted to offer up a bit of script that I wrote, for discussion, critique, or 'just because'. I welcome any input from you or anyone in the
group. I am sure there were probably easier ways of doing it, but I came up with this program about 3 months ago, it works well, so I left it aone.
You know what they say 'If it ain't broke, keep your d*#! hands off of it' ;-)
Charles K. Rishel
IT Manager
McKean Machinery Sales
http://www.mckeanmachinery.com
#!/bin/perl
#This program created by Charles K. Rishel
#Why??
#1. I got tired of manually deleting up to 200 images from our Web-Server.
#2. Why not?
#This program will read a list of files to delete from an input file,
#and remove the files contained in that file, from the current dir.
$infile="remove.txt"; #variable to hold the input filename.
$countallfiles=0; #variable to hold the number of files in list
$count=0; #variable to hold the number of files deleted
open(IN,$infile)|| die "cannot open $infile for reading: $!\n"; #opens the input file
while(<IN>) #loop until end of $infile is reached, reading each line of text.
{
$countallfiles++; #This increments the file counter for all files in list
s/ 00//; #This code is remarked below.
$filename=$_;
chomp($filename);
$filename="$filename.jpg";
if (unlink($filename)>0)
{
$count++; #This increments the file counter for deleted files
}
#The following code will print all filenames not deleted.
#not necessary for my purposes, so commented out.
# else
# {
# print "cannot delete $filename: $!\n";
# }
}
print "$count of $countallfiles files deleted.\n";
#The following code is used to remove the 2 spaces and 2 leading zero's from
# the input data file, and append the .jpg extension making a valid image filename.
# s/ 00//; #removes the spaces between the supplier and item# leading 0's
# $filename=$_; #variable to hold the new string, now in file format
# chomp($filename); #remove the null character at end of string
# $filename="$filename.jpg"; #append .jpg to the end of the string
#The input file data AT 001401, comes through this process as AT1401.jpg, and this filename
#can then be used to remove the applicable file. The nice part is that if you already have a
#list containing valid filenames such as AT1401.jpg, you can eliminate the step to add the
#extension, and all will be fine.
On 02/12/2000 3:27:37 AM, Brian Mathis wrote:
>Sorry if you get this twice..
>------------------
>Hello all,
>
>We will be having a meeting this coming Wednesday at Monty's Crown. Age
>should not be an issue, but if you are concerned about it, just send me a
>note, and we can go right to Boldo's Armory. It's 50 feet away, so it's no
>big deal. (Also, there's very few people there on Wed, so it should be
>pretty easy to find us).
>
>Recently, we have changed the meetings to a more social type of thing, and
>moved to the bar, in hopes that people were more interested in that. If
>that is not the case (as the past few meetings have been scarcely
>attended), please show up and give us your input on what you'd like to do.
>
>I have updated the web site with new calendars, and added a little more
>info to it. I have added Monty's Crown as a meeting place, and have
>started to place on the calendar where each meeting will be held. If
>you're not sure where it will be, check the calendar.
>
>I've also added instructions on how to unsubscribe from the list, in case
>you were interested in doing that.
>
>You should also notice (hopefully), that there is now a tagline on the
>bottom of each message, directing you to the web site.
>
>--
>Brian Mathis
>Direct Edge
>http://www.directedge.com
>----------
>For information on unsubscribing from this list, please visit http://rochester.pm.org
>
----------
For information on unsubscribing from this list, please visit http://rochester.pm.org
More information about the Rochester-pm
mailing list