import os
filename =
'15464657761111111.pdf'
pathDir =
'F:/tqcs/sr'
if os.path.exists(pathDir +
'/' + filename):
print(filename +
'文件在' + pathDir +
'中存在 ! ')
else:
file =
open(
'F:/tqcs/msmj.txt',
'wr')
print(filename +
'文件不存在sr目录下,将名字写入到msmj.txt文件中 ! ')
file.
write(filename)
file.
close()
转载于:https://www.cnblogs.com/bilaisheng/p/10211037.html