WWW

NAVIGATION
CATEGORIES
REFERRENCE
LINKS
  • sorting filenames ?

    0 answers - 713 bytes - related search similar search Add To My Delicious Add To My Stumble Upon Add To My Google Mark Add To My Facebook Add To My Digg Add To My Reddit

    I know how to read out filenames within my current directory.
    But now I have the following question in my directory there are a lot
    of files with the format <number>.txt, like 1.txt , 2.txt and so on
    These files are automaticly generated by an other script.
    Is there a way to retrieve all the <number>.txt files, and more
    important is there an easy way to find out what the highest number of
    those files is ?
    With these lines I read out the current filenames:
    opendir (homedir,".") || die("unable to open directory");
    while (defined($filename=readdir(homedir))){
    print qq{$filename<br>};
    }
    closedir(homedir);
    I hope someone can help me out here

Re: sorting filenames ?


max 4000 letters.
Your nickname that display:
In order to stop the spam: 5 + 5 =
QUESTION ON "WWW"

EMSDN.COM