Jump to content

How can I automatically delete contents of Recycler folder?


Recommended Posts

Posted

I have noticed (using Treesize) that some of our users have some large files within their 'My documents' folder. On investigation, many of these are in the Recycler folder. These deleted files are taking up huge amounts of space, some are in excess of 70Mb. Is there a way of deleting these files without going into every users documents and deleting it? I can't let the user do this as they won't be able to see the folder anyway as it is a system folder. Most of what the users can see and do are controlled by system policies.

 

The PCs are running XP Pro and the server is running Windows Server 2003.

 

Can anyone help?

 

Thanks

Posted

We use this in a batch file to clear staff desktops. We have it running as a logoff script. If you adapt this it can do your job

 

del "C:\Documents and Settings\%username%\Desktop\*.*" /Q /S /F

Posted

Hi

Thanks.

We have a batch file running at the moment which clears tmp files from the user profiles, it goes like this:

del /F /Q /S "\\RDC2259\Profiles$\%username%\Microsoft\Publisher\*.*"

del /F /Q /S "\\RDC2259\Profiles$\%username%\Local Settings\Temp\*.*"

del /F /Q /S "\\RDC2259\Profiles$\%username%\Cookies\*.*"

del /F /Q /S "\\RDC2259\Profiles$\%username%\Macromedia\*.*"

del /F /Q /S "\\RDC2259\Profiles$\%username%\Microsoft\Word\~WRL*"

del /F /Q /S "\\RDC2259\Profiles$\%username%\Microsoft\Word\*.wbk"

del /F /Q /S "\\RDC2259\Profiles$\%username%\Microsoft\Office\*.TMP"

del /F /Q /S "\\RDC2259\Profiles$\%username%\Microsoft\Office\Recent\*.*"

del /F /Q /S "\\RDC2259\Profiles$\%username%\*.tmp"

del /F /Q /S "C:\Documents and Settings\%username%\Application Data\Microsoft\Word\*.*"

del /F /Q /S "C:\Documents and Settings\%username%\Microsoft\Publisher\*.*"

del /F /Q /S "C:\Documents and Settings\%username%\Local Settings\Temp\*.*"

del /F /Q /S "C:\Documents and Settings\%username%\Cookies\*.*"

del /F /Q /S "C:\Documents and Settings\%username%\Macromedia\*.*"

del /F /Q /S "C:\Documents and Settings\%username%\Microsoft\Word\~WRL*"

del /F /Q /S "C:\Documents and Settings\%username%\Microsoft\Word\*.wbk"

del /F /Q /S "C:\Documents and Settings\%username%\*.tmp"

 

But this does not look at their 'My documents' folder. Will your batch file do this? My IT expert (who visits once a month) did this one.

Posted
Yep it should be fine then, just change the path to point to the correct folder located in the home area. You can adapt your own to do it by putting a few extra lines in.
  • Thanks 1

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now



×
×
  • Create New...