On Jul 21, 10:02 am, Gary <woody...@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. -- http://mail.python.org/mailman/listinfo/python-list