Just another Perl shrine | |
PerlMonks |
filtering hidden files on Win32by jjdraco (Scribe) |
on Aug 30, 2002 at 06:57 UTC ( [id://194011]=perlquestion: print w/replies, xml ) | Need Help?? |
jjdraco has asked for the wisdom of the Perl Monks concerning the following question:
im currently trying to teach myself perl, i'm working on a script to read a given directory and rename all the files in the directory to the format dir####.ext where dir is the directory name and #### is 0000 through 9999. i've read the list of files in to an array called @file_list but i wanted to filter out any directory, which i was able to do, however i ran across a problem, there was a hidden file in the directory, and i don't want to rename it, i found a way to not rename this file, but i would prefere a more generalized way of doing this, my code for reading the directory is this @file_list= grep {!/Thumbs.db/ && -f "$_" } readdir(DIR); is there away to just filter hidden files? thanks for the help jjdraco Originally posted as a Categorized Question.
Back to
Seekers of Perl Wisdom
|
|