#Please change the working directory path = 'C:\Users\User\Desktop\Script_data\\' import sys, os,re for fname in os.listdir(path+"FastTree\Input\\"): if fname[fname.rfind("."):].upper() == ".FAS": print "Approximate_ML_tree_construction: " + fname os.system(path + 'FastTree\\FastTree.exe' + ' ' + path + 'FastTree\Input\\' + fname + ' ' + '>' + ' ' + path + 'FastTree\Output\\'+ fname) print "AML Tree were created successfuly"