>>> import o
>>> loadcases=os.listdir('F:\sinoma')
>>> out=open('F:\findnames.txt','w'
>>> out=open('F:\\findnames.txt','w')
>>> for loadcase in loadcases:
subcases=os.listdir('F:\sinoma'+os.sep+loadcase)
for subcase in subcases:
out.write(subcase+'\n')
>>> out.close(