thanks for the responses. still not working, but i will keep on plugging away or just use one of the scripts that already exist for doing backups and modify it for what i want.
joe On Tuesday 06 August 2002 08:25, Joseph Paish wrote: > here is a copy of the script i am working on > > #!/usr/bin/perl -w > use strict ; > > my ($sec, $minutes, $hr, $monthdate, $month, $year, $weekday, $year_date, > $daylight_savings) = localtime(time) ; > my @month_names = ("Jan", "Feb", "Mar", "Apr", "May", "Jun", "Jul", "Aug", > "Sep", "Oct", "Nov", "Dec") ; > > my $date_string = join "_", $month_names[$month], $monthdate, ($year + > 1900) ; > > my @temp_array = ( "mkdir", "/mnt/floppy/$date_string" ) ; > system (@temp_array) ; > > my @filenames = ("/home/jpaish/trash") ; # eventually several files > > use File::Copy ; > > foreach my $single_filename (@filenames) { > print ( "the current filename is : $single_filename \n") ; > copy ( "$single_filename", "/$date_string/$single_filename" ) ; > } > > ----- > > a couple of questions : > > 1. why doesn't the copy command in the foreach loop expand the $date_string > and $single_filename to their values? i thought that if i put it in quotes, > it would expand out to the correct values (the print statement inside the > foreach works ok). there are no errors, just an empty directory. > > ------ > 2. when i go to delete the Aug_06_2002 directory using rm -r, i am told > that the directory is write protected, and i am asked if i want to delete > it anyway. i answer yes, and i am allowed to delete it with no problem. > this is with my own account, not as root. > > is the write protection a result of the way i have created the directory? > (see code below) > > my @temp_array = ( "mkdir", "/mnt/floppy/$date_string" ) ; > system (@temp_array) ; > > ------ > > thanks > > joe -- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]