Command to empty recycle bin on ...

Callahan December 4, 2003 at 20:05:40
Specs: XP, 512


If possible, I would like to know if there is a command/dos line that could be added to the logout field of each user on a network in order that the recycle bin gets emptied each time they logout? Perhaps a dos command that could execute a batch file?? I have very limited knowledge in this area. I realize there are 3rd party applications that may be able to accomplish this, however the network in question is very large and it is not feasible to install an app. on each and every computer. Any help would be very much apprecited.



See More: Command to empty recycle bin on ...

Report •

CyberRax December 5, 2003 at 00:17:18

del C:\RECYCLED\?*.*

DEL is an internal command of CMD.EXE so it might be neccessary to load it first (ie the line might be something like this: CMD.EXE /C del C:\RECYCLED\?*.*)

Also, command interpreters usually ask for confirmation in case all files are to be deleted (which is exactly what is done by the "*.*" part). That is why I included the question mark in front of the stars. It *does* fool COMMAND.COM from Win98SE, but I'm not sure that newer versions are also that stupid. It does fail by 4DOS (but there are other methods to skip the questioning under that interpreter).

Report •

Callahan December 5, 2003 at 04:34:29

Thanks for the reply CyberRax. Based on the info you provided, is there a way to add this to a batch file for instance that would execute each and everytime someone logged off from a workstation?

Report •

December 28, 2005 at 10:24:59

Hey, just a couple corrections... 1. It's c:\Recycler NOT C:\Recycled 2. Go to Start --> Accessories --> Task Scheduler to run the batch file at every startup or specified time(s).


~With the lights out, it's less dangerous...

Report •

Related Solutions

Ask Question