FRIHOST FORUMS SEARCH FAQ TOS BLOGS COMPETITIONS
You are invited to Log in or Register a free Frihost Account!


%temp%





Tony The Tiger
I use Windows Vista and I was on the phone with tech support. They told me to go to the searchbar within the start button and type in "%temp%" and erase the files. The command took me to a temp folder. What is the logic of the %temp% search entry.
Tony The Tiger
He also the told me to search on prefetch and clear those files as well. What does prefetch do?
AftershockVibe
%Temp% isn't really the name of a directory. Windows has a set of path variables and Temp just happens to be one of them. %Windir% will always take you to the directory where windows was installed.

Regardless of your Windows version %Temp% points to your temporary directory. So, it makes writing installers and scripts for multiple platforms easier. Otherwise you'd need to dig around in X:\Documents and Settings\user\temp or X:\temp or X:\windows\temp depending on what version you ran the program on and which drive windows was installed on.

Temp is just a place where things are stored temporarily (usually installer files). Clearing it will only save disc space. Prefetch on the other hand is quite a clever (but not well thought out) idea. Basically, Windows uses it to store data/code for running the programs you most commonly use in there. This allows Windows to load this at boot so these applications will launch faster.

Unfortunately, Windows never clears it out! So, after running Windows for 6 months it gets filled up with old versions, things you never run any more and other junk that is still loaded at boot time! Clearing it should speed things up at boot.
Agent ME
In windows, words surrounded by % in either directories or dos-scripts refer to an environment variable. There's quite a few more for other directories, such as one pointing to where your Program Files folder is, etc.
When windows parses the text and finds an environment variable, it just replaces the %-surrounded text with the value.
Tony The Tiger
Agent ME wrote:
In windows, words surrounded by % in either directories or dos-scripts refer to an environment variable. There's quite a few more for other directories, such as one pointing to where your Program Files folder is, etc.
When windows parses the text and finds an environment variable, it just replaces the %-surrounded text with the value.


O.K. so what I want to know is what is the syntax to use the % command. For example, when searching in Windows I use to use the * key as a catchall. How do I use % syntactically?
AftershockVibe
You can get a list of them by right clicking My Computer > Properties, then on the advanced tab click the "environment variables" button.

Add your own as necessary. You'll need to be an administrator though.

EDIT:

Apologies if I didn't answer this originally, but you use them you just place %whatever% in any command that will be passed to the command line. So, this can be directly, through a file system dialogue box or through a batch file or something.

So, if you want to copy RegEdit's exe you can do:
Code:
cp %windir%\regedit.exe c:\


or if you want to save something from Firefox in the temp directory you can click "save as..." and enter "%temp%\filename.xyz" in the dialogue box.
Tony The Tiger
AftershockVibe wrote:
You can get a list of them by right clicking My Computer > Properties, then on the advanced tab click the "environment variables" button.


I am using Windows Vista Home Premium. I think you may be giving me XP instructions.
badai
you can use this software to automagically delete your temp file

http://nodesoft.com/EraseTemp/

just create a short cut, and paste it in your startup folder. for vista you must create the shortcut somewhere, then copy paste into your startup folder, you cannot right-click-drag to your startup folder

about prefetch, since you are using vista, there is no prefetch in vista. it's called "SuperFetch" (microsoft has become quite good in coming up with catchy terms and phrases now).

in XP, prefetching is a process in which the operating system loads key pieces of data and code from disk into memory before it's actually needed. in order for this prefetching operation to actually improve performance, the Windows XP Cache Manager monitors the data being moved between the disk and RAM and between RAM and virtual memory when the system is booting up as well as when various applications are loaded. as the Cache Manager monitors these occurrences, it constructs maps of the directories and all of the files that were referenced for each application or process. these maps are then saved to files with a .pf extension in the \Windows\Prefetch folder. once these map files have been created, the Cache Manager will use them to improve efficiency when the system boots up as well as when loading applications. more specifically, the Cache Manager will intercept every process or application that is about to be loaded and will check the \Windows\Prefetch folder to see if there is a corresponding map. if there is, the Cache Manager will call on the file system to immediately access the directory and files referenced in the map. the Cache Manager will then alert the Memory Manager and tell it to use the information in the map file to load data and code into memory. once this prefetch operation is complete, the Cache Manager will allow the application or process to continue loading. as the application or process does so, it will find the majority of the files and data that it needs already available in memory, thus reducing the amount of disk access and allowing the application or process to load or respond faster. in order to further improve the efficiency of this prefetching operation, Windows XP will regularly analyze the contents of the map files, compile a list of the directories and files, organize them in the order in which they are loaded, and save this information in a file called layout.ini in the \Windows\Prefetch folder. it will then schedule disk defragmenter to run on a regular basis and use the information in the layout.ini file to relocate all of the directories and files listed to a contiguous area of the disk.

in Vista, SuperFetch does everything that prefetch does, and then some more. SuperFetch overcomes one of the big drawbacks in Windows XP's prefetch technology. prefetch improves efficiency by loading the majority of the files and data needed by an application or process into memory so that they can be accessed very quickly when needed. however, because these files and data exist in memory, they are subject to the laws governing virtual memory. in other words, when other applications need access to memory, any prefetched data is moved out to the page file on the hard disk. when it is needed again, it then must be moved back from the page file to memory, which of course offsets the performance enhancement. SuperFetch goes one step further to ensure that you get the most out of the performance enhancement. in addition to constructing the map files, SuperFetch also constructs profiles of the applications you use that include information about how often and when you use them. SuperFetch then will keep track of the applications in your profile and note when any prefetched data is moved out to the page file. SuperFetch will then monitor the progress of the application that caused the prefetched data to be moved out to the page file and, as soon as that application is done, it will pull the prefetched data back into memory. so when you go to access the application, the prefetched data will again be available in memory and the application will be very responsive.

Vista's SuperFetch feature is incredibly powerful on its own -- don't mess with it!
frih
this folder contains all the temporary file used by different softwares during extracting the package.
Tony The Tiger
badai wrote:
in XP, prefetching is a process in which the operating system loads key pieces of data and code from disk into memory before it's actually needed. in order for this prefetching operation to actually improve performance, the Windows XP Cache Manager monitors the data being moved between the disk and RAM and between RAM and virtual memory when the system is booting up as well as when various applications are loaded. as the Cache Manager monitors these occurrences, it constructs maps of the directories and all of the files that were referenced for each application or process. these maps are then saved to files with a .pf extension in the \Windows\Prefetch folder. once these map files have been created, the Cache Manager will use them to improve efficiency when the system boots up as well as when loading applications. more specifically, the Cache Manager will intercept every process or application that is about to be loaded and will check the \Windows\Prefetch folder to see if there is a corresponding map. if there is, the Cache Manager will call on the file system to immediately access the directory and files referenced in the map. the Cache Manager will then alert the Memory Manager and tell it to use the information in the map file to load data and code into memory. once this prefetch operation is complete, the Cache Manager will allow the application or process to continue loading. as the application or process does so, it will find the majority of the files and data that it needs already available in memory, thus reducing the amount of disk access and allowing the application or process to load or respond faster. in order to further improve the efficiency of this prefetching operation, Windows XP will regularly analyze the contents of the map files, compile a list of the directories and files, organize them in the order in which they are loaded, and save this information in a file called layout.ini in the \Windows\Prefetch folder. it will then schedule disk defragmenter to run on a regular basis and use the information in the layout.ini file to relocate all of the directories and files listed to a contiguous area of the disk.

in Vista, SuperFetch does everything that prefetch does, and then some more. . .


Thank you very much for the overview. Even your discourse is a little intimidating, but it is helpful.
blasux
In any windows you can use "set" command in dos prompt to see environment variables.
snowboardalliance
I've read that you don't need to clear the prefetch, except maybe after you have uninstalled a lot of programs. It was in some good xp tweak guide...ahh here http://www.tweakhound.com/xp/xptweaks/supertweaks11.htm
Tony The Tiger
snowboardalliance wrote:
I've read that you don't need to clear the prefetch, except maybe after you have uninstalled a lot of programs. It was in some good xp tweak guide...ahh here http://www.tweakhound.com/xp/xptweaks/supertweaks11.htm


You never HAVE to clear the prefetch.
Related topics
PHP Write to line
script backup database
Tutorials
Okay, I'm done trying to use CSS for layout.
more funny sef movies 2
[java scripts] Text effect , img ....
Try this program!!
New record here; Temp Employee worked < hr
Job that u wouldn't mind doing for the rest of your life
What is a good idle temp for an opty 148?
m-productions homepage TEMP
Computer Temp. and cooling
Am I able to create a temp website for tests and delete it?
How Temp Jobs Can Be Beneficial To You
Reply to topic    Frihost Forum Index -> Computers -> Software

FRIHOST HOME | FAQ | TOS | ABOUT US | CONTACT US | SITE MAP
© 2005-2011 Frihost, forums powered by phpBB.