Tom's Guide | Tom's Hardware | Tom's Games
![]() |
![]() |
![]() |
Hello,
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.
Thanks,
Callahan

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).

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?

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).
~r00t
~With the lights out, it's less dangerous...

![]() |
counting in a batch file
|
Boot to windows form dos
|

This post is quite old and has been locked from receiving new replies. Please create a new posting instead.
| Ads by Google |