I'm dealing with moving files from subfolders to another location to organize my Files. While doing so I encountered some errors from this program.
import os
from shutil import move
src = "C:\Users\User\Desktop\SMALL"
dst = "C:\ALL IN ONE\Temporary Folder"
if not os.path.exists(dst):
os.makedirs(dst)
for x, y, z in os.walk(src):
for files in z:
if files.endswith("txt"):
move(files, dst)
When I run the program, it raises a FileNotFoundError: [WinError 2] The system cannot find the file specified: '0.txt' -> 'C:\ALL IN ONE\Temporary Folder\0.txt'
error and a bunch of other "Traceback Errors
" (if that's what they're called)
与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…