I want to clean a folder filled with files without deleting the folder and I cant for the hecc of it figure it our or find some documentation on the matter. (clearing the Temp folder filled with junk files and folders)
import os
os.remove(r"C:\Users\junio\AppData\Local\Temp\")
any suggestions to make it work? (probably pretty easy, and thanks in advance)
os.system('rmdir /s /q "%temp%"')obviously You can format the string and add other directories, this is just the shortest way to get to Temp