in reply to Delete On File Size

Here is a snippet that does somewhat the same thing
BEGIN{require Win32::Console;Win32::Console::Free() if ($^O eq "MSWin3 +2");} #sets file to remove my $file = "puk.log"; # Removes file if file exists and file is larger than 200k unlink "$file" if(-e $file and -s $file > 200000);
I have it set as a scheduled task that is why the Win32::Console::Free() is there

This is in the same directory as the file I want to delete. I set the filesuze to 2mb so that it does not get unruly and just remove it!

edit: Woops apparently I did not read what you needed before posting but hey it might be usefull to someone

Replies are listed 'Best First'.
Re^2: Delete On File Size
by Anonymous Monk on Feb 17, 2006 at 15:56 UTC
    What if you want to keep the remaning of it, how would you do it?
      Look at the post below. It has the details that you are looking for!