import shutil
import os
source = os.listdir("report")
destination = "archieved"
for files in source:
if files.endswith(".json"):
shutil.copy(files, destination)
I have the file named, 'a.json' inside the report folder report/a.json; however, the file is not moved/copied to the target folder
Console Error:
*** FileNotFoundError: [Errno 2] No such file or directory: 'a.json'

shutil.copy.