Jokerman64 Posted November 12, 2010 Posted November 12, 2010 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
FN-GM Posted November 12, 2010 Posted November 12, 2010 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
Jokerman64 Posted November 12, 2010 Author Posted November 12, 2010 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.
FN-GM Posted November 12, 2010 Posted November 12, 2010 How do you run this script? There is no reason why mine cant. I assume you have home areas stored on the server?
Jokerman64 Posted November 12, 2010 Author Posted November 12, 2010 It is done thro' Group Policies Manager and runs at log on and log off. Yes there are home areas on the server.
FN-GM Posted November 12, 2010 Posted November 12, 2010 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. 1
Jokerman64 Posted November 12, 2010 Author Posted November 12, 2010 OK Thanks very much for your help.
Recommended Posts
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 accountSign in
Already have an account? Sign in here.
Sign In Now