Solved

windows temp file

Posted on 2011-03-16
10
487 Views
Last Modified: 2012-06-21
i have found that multiple application user the c:\user\[username]\appdata\temp\ directory
so on my network, this temps folder vary between 2 gig and 22 gig of temp file

there is a way to control it, or to delete it when the session of a user start ?
0
Comment
Question by:GCI_SUPPORT
  • 5
  • 4
10 Comments
 
LVL 5

Expert Comment

by:sweeps
Comment Utility
Creating the Batch File to Clean Temporary Files
1.Open Notepad and type the following:

cd C:\Users\%username%\AppData\Local
rmdir /S /Q Temp

2.Save the file as cleantemp.bat

3.Now double click on the file to remove your temporary files and free up space on your computer
If this doesn’t work and gives an access error, try replacing %username% with you windows login username.

Automating the Process of Deleting Temporary Files
To automate this process, so you do not need to remember to run it, do the following:

1.Right click on the batch file and select create shortcut
2.Place the shortcut in your startup folder in the start menu
Now when you log in to Windows 7, your temporary files will be deleted.

0
 

Author Comment

by:GCI_SUPPORT
Comment Utility
thanks
ill give a try
0
 

Author Comment

by:GCI_SUPPORT
Comment Utility
by the way there is a way to do it in a login script ?
0
 

Author Comment

by:GCI_SUPPORT
Comment Utility
reinstall windows, i don't think is a good idea. with a park of pc
0
How to run any project with ease

Manage projects of all sizes how you want. Great for personal to-do lists, project milestones, team priorities and launch plans.
- Combine task lists, docs, spreadsheets, and chat in one
- View and edit from mobile/offline
- Cut down on emails

 
LVL 5

Expert Comment

by:sweeps
Comment Utility
Create the script and place it on a commonly accessible network share. maybe you can set it to run with  group policy and select Computer Configuration --> Windows Settings --> Scripts --> Log-Off or Shutdown. Add a reference to the script
0
 
LVL 5

Expert Comment

by:sweeps
Comment Utility
also please try this out on a test machine first to make sure you get the desired results.
0
 
LVL 5

Accepted Solution

by:
sweeps earned 500 total points
Comment Utility
OK, if you save the bat file on a mapped drive, then add this code into your logon vbs

Set WshShell = CreateObject("WScript.Shell")
WshShell.Run chr(34) & "put your network path here" & Chr(34), 0
Set WshShell = Nothing

it will only delete files that are not in use but seems to get most out of the folder.

change the "put your network path here" with the relevant network path.  

you can test this by putting just this code into a vbs file on your computer and put the bat file out on the network and look at your temp folder so you get the idea of how much stuff is in it.  Then run the vbs file.  Then recheck your temp folder and see that most items are removed.

as always a test machine is a good idea for testing this.
0
 
LVL 5

Expert Comment

by:sweeps
Comment Utility
Thank you!
0
 

Author Comment

by:GCI_SUPPORT
Comment Utility
thanks sweep everything is working fine
0

Featured Post

What Should I Do With This Threat Intelligence?

Are you wondering if you actually need threat intelligence? The answer is yes. We explain the basics for creating useful threat intelligence.

Join & Write a Comment

Suggested Solutions

Image capture and Deploy method is consist on two phases. In our first phase we capture the image of windows from the PC in which Windows and others softwares are already installed. In second phase we deploy the created image on new PC in which we…
By now, it is common knowledge that Windows 7 has been successfully been able to live up to the hype of being touted as Microsoft’s most anticipated O.S. ever. This latest 2010 Windows release builds up on its predecessor’s positives, adding new…
In this video, we discuss why the need for additional vertical screen space has become more important in recent years, namely, due to the transition in the marketplace of 4x3 computer screens to 16x9 and 16x10 screens (so-called widescreen format). …
This Micro Tutorial will teach you how to change your appearance and customize your Windows 7 interface to your unique preference. This will be demonstrated using Windows 7 operating system.

728 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question

Need Help in Real-Time?

Connect with top rated Experts

9 Experts available now in Live!

Get 1:1 Help Now