The procedure collects and lists you the Temporary Files from the Current User Directory, Procedure will list Windows Temp Files when you run the script as System User.
Note:
Please run the Script as System User or Logged in User
import os
import tempfile
def showtempfiles():
for rt, di, fi in os.walk(tempfile.gettempdir()):
for fn in fi:
print (os.path.join(rt, fn))
if __name__=='__main__':
showtempfiles()
Comments