Page 1 of 1

getting all filenames from a location

Posted: Tue Apr 20, 2004 1:42 am
by Coco
The script im using atm automatically creates a counter file in a folder, but doesnt remove them after the system is finished with them. I know how to remove them when they need to go, but obviously before then i need to do some garbage collecting.

So... Is it possible to load every filename from a folder into an array? basically i need to go thru the whole folder, check the file is current to the db, and remove it if it isnt.


Answers as always, gratfully recieved :)

Posted: Tue Apr 20, 2004 3:14 am
by JayBird
Hi,

Never noticed you were from leeds before :) i am from leeds but live ion York now.

Anyway, to answer your question, have a look at the directory function in the manual, especially this function http://se.php.net/manual/en/function.readdir.php

Mark