Home: Perl Programming Help: Intermediate:
'ghost' files!!!



69_vette
Deleted

Jun 7, 2000, 4:03 PM


Views: 7182
'ghost' files!!!

AHHH!!!

One of my scripts that I was testing accidently made these 'ghost' files...

I can see the files in my FTP but I can't do ANYTHING with them...

Anyhow... Is there a quick way to wipe out everything within a directory so that I can get rid of these things?


69_vette
Deleted

Jun 7, 2000, 10:20 PM


Views: 7182
Re: 'ghost' files!!!

WEll, I figured out what was wrong...

The script was creating files that looked like this...

filename\n.html

except of course the \n was an actual line return...

OUCH, how do I delete files like that?


TheGame+
Deleted

Jun 8, 2000, 1:22 AM


Views: 7182
Re: 'ghost' files!!!

Make another script to delete them Smile

The webserver may execute your script under a different account than yours, so you may not always have the right to change them afterwards via FTP.
It depends on how the webserver is configured to run CGI scripts, and on whether your script chmod()s the files it creates...


69_vette
Deleted

Jun 8, 2000, 10:38 PM


Views: 7182
Re: 'ghost' files!!!

Thanks dws!

Problem solved...


dws
Deleted

Jun 9, 2000, 12:04 AM


Views: 7182
Re: 'ghost' files!!!

Write a script.

unlink("filename\n.html");