Link to home
Start Free TrialLog in
Avatar of NewtonianB
NewtonianB

asked on

getting list of files and error checking

my @directoryListing = <*.txt *.TXT *.doc *.DOC *.pdf *.PDF>;

Is this a good way of retrieving the list of files in the current working directory?
how would you add error checking to this?
SOLUTION
Avatar of mrjoltcola
mrjoltcola
Flag of United States of America image

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
Avatar of NewtonianB
NewtonianB

ASKER

are there predefined lists I can feed to this file retrieval system?
let's say I wanted to encompass all the possible types of document files or image files, is there a way to do that or do I have to manually enter each extension both lowercase and uppercase?

in terms of error I was wondering wether directory listing would ever be denied to the scirpt
ASKER CERTIFIED SOLUTION
Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial