Stephen Boulet wrote: > > Does anyone know how to tell which of the strings from os.lisdir('somedir') > are directories? Thanks. >>> import os >>> for i in os.listdir('.'): ... if os.path.isdir(i): ... print 'Dir', i Dir a Dir RECYCLED Dir TEMP Dir dev Dir bin Dir backup Dir WINDOWS Dir Program Files Dir My Documents Dir cache -Peter