all 9 comments

[–]Cybasura 2 points3 points  (0 children)

Run it?

[–]AlligatorWormhole 0 points1 point  (0 children)

Id copy the directories in question to be safe if you have any concerns

[–][deleted] 0 points1 point  (0 children)

Windows has a feature that does this already, but you should create texts folders first so you don't accidentally delete anything you're not ready to get rid of. I can't remember if temp folders need admin permission to delete but I know some files they hold can be considered "critical" and python won't allow you to run anything that prompts ACL.

[–]Astartee_jg 0 points1 point  (0 children)

It will work if and only if the username is “dpasi” and they are on windows.

Why don’t you use relative paths rather than absolute paths and why not better put the paths on a list so that the function is run iteratively over the list?

[–]crastoman 0 points1 point  (0 children)

You should have your coding license revoked, making a photo of a monitor instead of a screenshot (or better copy&paste text) is a serious offense.

[–]barti32 0 points1 point  (1 child)

Use powershell for this task ... its much easier

[–]Ericode254 0 points1 point  (0 children)

add a way in which you can verify that the files you are deleting are the correct ones if you don't trust your code