I have a folder called Reports with multiple folders ID1, ID2, ID3...and so on. Each of these folders have a json report. Now I want to copy all these json reports into a single folder called Input
import os
import sys
import shutil
list={}
list=os.system("find /home/admin1/Report -name '*.json'")
print list
for i in list:
os.system('cp i /home/admin1/Input')
This gives error: TypeError: 'int' object is not iterable
osorglobmodule to get a list of dirs. with json