Please use the below script to get all files of download folder of all users
Explanation:
Finds download folder of all users
Lists all files of each folder recursively
import os
uPath = 'C:\\Users'
lDirectories = os.listdir(uPath)
dPaths = []
for eDir in lDirectories:
uNPath = os.path.join(uPath, eDir)
try:
lSDs = os.listdir(uNPath)
for eSD in lSDs:
if eSD.lower() == 'downloads':
dPaths.append(os.path.join(uNPath, eSD))
else:
continue
except Exception:
pass
for dPath in dPaths:
try:
print(os.popen('dir /s "'+dPath+'"').read())
except Exception:
pass
Sample Output: