sindresorhus / trash

Move files and directories to the trash
MIT License
2.58k stars 79 forks source link

On Windows, whose trash is used? #128

Open ChrisMiami opened 4 months ago

ChrisMiami commented 4 months ago

This is more of a usage question than an issue.

If I run trash in my web service, which runs as SYSTEM on Windows, where is the file trashed to? Is there a trash folder for the SYSTEM (non-login) account? I looked in recycle-bin's repo but didn't see anything in the code that would indicate how this might be handled. Perhaps it moves to Administrator's trash? Perhaps it deletes because "there is no trash folder"? Perhaps it just fails?

Thanks!

ChrisMiami commented 4 months ago

This forum seems to imply that SYSTEM does, indeed, have its own recycle bin. Assuming that's true, that's where the files will end up. I'll have to set up a yearly purge I guess...