in reply to Re: File deletion
in thread File deletion

Also $file doesn't contain what you assume it does, hence all your deletes fail when you prepend the path.