Tech Support > Microsoft Windows > Windows Server > Script to Delete Temp Files
Script to Delete Temp Files
Posted by Aj on April 18th, 2006


We have a Setup in which there is a Server which Contains Profiles and User
data . . Now when Users are working a lot of Temporary files are generated
which Fills up the Drive space over a Peroid of time . .Then the solution is
to manully serch for those files and delete them. . I have tried writing a
Script

cd\
d:
date /T > d:\log.txt

Dir /s *.tmp *.dbf *.mdx >>d:\log.txt
Del /s /q *.tmp *.dbf *.mdx >>d:\log.txt
Dir /s *.tmp *.dbf *.mdx >>d:\log.txt
exit

Somehow I suspect its not Doing a Good Job .

Can Sombody Please help me finding out something more refined as I dont have
much knowladge about scripting.

Posted by Pegasus \(MVP\) on April 18th, 2006



"Aj" <Aj@discussions.microsoft.com> wrote in message
news:B122C259-B1F8-4DC4-A4DA-426E34380CDE@microsoft.com...
We can't tell if your script is doing a good job or not
unless you tell us the result. Remember that we cannot
see your machine!

The script itself looks fine.



Posted by steve on April 18th, 2006


"Aj" <Aj@discussions.microsoft.com> wrote in message
news:B122C259-B1F8-4DC4-A4DA-426E34380CDE@microsoft.com...
To achieve this I run the delprof utility via GPO startup script that
silently deletes all user profiles that have been inactive for 30 days or
more. Works very well, and no coding required!

steve




Similar Posts