|

楼主 |
发表于 2020-5-19 14:53:35
|
显示全部楼层
我执行了结果如下:
请输入待查找的初始目录:d:\
请输入需要查找的目标文件:test1.txt
Traceback (most recent call last):
File "D:/py/learn/T4.py", line 16, in <module>
search_file(start_dir, target)
File "D:/py/learn/T4.py", line 10, in search_file
search_file(each_file, target) # 递归调用
File "D:/py/learn/T4.py", line 10, in search_file
search_file(each_file, target) # 递归调用
File "D:/py/learn/T4.py", line 4, in search_file
os.chdir(start_dir)
PermissionError: [WinError 5] 拒绝访问。: 'S-1-5-18'
Process finished with exit code 1 |
|