Click to See Complete Forum and Search --> : delete file problem


jagguy
12-06-2006, 08:22 PM
I want to read in a directory of filenames, and decide which files to delete by going through the filenames.

The problem is I forget how to read in a dir(I am sure I could do it a while ago) and when deleting on winxp home with ulink() I always get permission denied.

chrisranjana
12-06-2006, 10:21 PM
opendir(DIR1,"c:/directory/");

@filenames = readdir(DIR1) #returns filenames

closedir(DIRHANDLE);

also you can use forward slash or two backward slashes in windows.

jagguy
12-07-2006, 04:05 AM
thanks for that.
what about deletes because I get permission denied with winxp home.