Re: Deleting a file while other script still appending to

2008-02-07 Thread Chas. Owens
On Feb 7, 2008 5:54 AM, Mahdi A Sbeih <[EMAIL PROTECTED]> wrote: > Hi all, > > I have a script that logs activities to a txt log file. I noticed that > when deleting the file from another window or shell, the script stops > writing to the file. I was expecting something like the unix shell, > which

Deleting a file while other script still appending to

2008-02-07 Thread Mahdi A Sbeih
Hi all, I have a script that logs activities to a txt log file. I noticed that when deleting the file from another window or shell, the script stops writing to the file. I was expecting something like the unix shell, which is creating a new file and appending to it. execute this script: #!/u

RE: deleting a file

2002-05-31 Thread Shishir K. Singh
perldoc -f unlink -Original Message- From: Shishir K. Singh Sent: Friday, May 31, 2002 6:14 PM To: Lance Prais; Perl Subject: RE: deleting a file use unlink perl -f unlink -Original Message- From: Lance Prais [mailto:[EMAIL PROTECTED]] Sent: Friday, May 31, 2002 6:10 PM To

RE: deleting a file

2002-05-31 Thread Shishir K. Singh
use unlink perl -f unlink -Original Message- From: Lance Prais [mailto:[EMAIL PROTECTED]] Sent: Friday, May 31, 2002 6:10 PM To: Perl Subject: deleting a file Is it possible to delete a file or remove all the data using a perl command? I am using perl on windows, can you include dos

deleting a file

2002-05-31 Thread Lance Prais
Is it possible to delete a file or remove all the data using a perl command? I am using perl on windows, can you include dos commands within perl I tried to include Del in my script and it blew up. Thanks Lance -- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail:

Re: Adding/deleting a file

2002-01-16 Thread John W. Krahn
Rory Oconnor wrote: > > I need to touch a file with a "1" in it if a condition is true, and > either toggle the "1" to a "0" or delete the file (whichever is better, > probably toggle) if another condition is true. Excuse my > newbie-ness...but can anyone give me some hints as to the correct syn

Re: Adding/deleting a file

2002-01-16 Thread Ahmed Moustafa
Hi Rory, Assuming that if there is a problem in opening the file then it's 0, I hope the following code helps. #Code Begings if (open (INFILE, "; close (INFILE); } else { $flag = 0; } if ($flag == 0) { $flag = 1; } else { $flag = 0; } open (OUTFILE, ">file.txt") || die; pr

Adding/deleting a file

2002-01-16 Thread rory oconnor
I need to touch a file with a "1" in it if a condition is true, and either toggle the "1" to a "0" or delete the file (whichever is better, probably toggle) if another condition is true. Excuse my newbie-ness...but can anyone give me some hints as to the correct syntax for that? thanks, rory

Re: deleting a file

2001-07-15 Thread Teresa Raymond
Dear Japhy, Thank you! I thought I had to open the directory then delete the file to use unlink. Thank you again. >On Jul 15, Teresa Raymond said: > >>opendir (ADS, "$filepath/") || die "Can't open directory\n"; >>if (-e $file) >>{ >> unlink "$file"; >>} > >Why are you opening a directory

Re: deleting a file

2001-07-15 Thread Jeff 'japhy' Pinyan
On Jul 15, Teresa Raymond said: >opendir (ADS, "$filepath/") || die "Can't open directory\n"; >if (-e $file) >{ > unlink "$file"; >} Why are you opening a directory, but not using it? At first, I'd think you meant to just say: unlink "$filepath/$file" if -e "$filepath/$file"; But you sa

deleting a file

2001-07-15 Thread Teresa Raymond
Please help. I am trying to delete a file. I wrote the below code but when executed nothing happens. There is no error msg but the file is not deleted. opendir (ADS, "$filepath/") || die "Can't open directory\n"; if (-e $file) { unlink "$file"; } else { print "There is no file by th