Can someone help please
woooee at gmail.com
Thu Jul 21 19:16:00 CEST 2011
On Jul 21, 10:02 am, Gary <woody... at sky.com> wrote:
> For some reason it will not send me the first text file in the directory.
You have to print an unsorted list of the directory to know the name
or the first file in the directory. Files are not stored on disk in
alphabetical order, but are many times sorted in alphabetical name
order by a program that lists the directory. Note that if you want
the first file alphabetically, you can sort the list returned by
listdir() and then look for the first ".txt" file.
More information about the Python-list