#opening 'newfile' write in {file_list=open('file_list.txt','w')} #taking list of file have write in file {list_files = os.system("ls -1 /amxusers7/inf/aimsys/netabp6/all_scripts/voice")} #trying write in newfile {file_list.writelines(list_files)}
i getting error:
traceback (most recent call last): file "testpuneet.py", line 30, in ? file_list.writelines(list_files) typeerror: writelines() requires iterable argument
if using python, might python way:
import os open('file_list.txt','w') file_list: list_files = os.listdir('/amxusers7/inf/aimsys/netabp6/all_scripts/voice') file_list.write('\n'.join(list_files))
Comments
Post a Comment