Solved

Win 98 Temp Directory

Posted on 2000-02-16
7
256 Views
Last Modified: 2013-12-28
Could anybody pls tell me what is this C:\Temp directory which all the time grows by itself and stores the information whatever file I opened on whatever date..

I would really appreciate the help

Regards
0
Comment
Question by:rnarang98
  • 4
  • 3
7 Comments
 
LVL 6

Accepted Solution

by:
bartsmit earned 100 total points
ID: 2527649
windows stores temporary files in the folder that your temp environment variable points to. By default this is c:\windows\temp but if you have a SET TEMP=C:\TEMP line in your autoexec.bat then it will use the c:\temp folder instead.

Any program that stores a file in the temp folder should remove it when it is no longer needed. However programs sometimes crash and leave the file(s) behind.

You can safely delete files in the temp folder. add this line to your autoexec.bat:
ECHO Y | DEL C:\TEMP


0
 

Author Comment

by:rnarang98
ID: 2527798
Adjusted points to 50
0
 

Author Comment

by:rnarang98
ID: 2527799
I can see in my autoexec.bat.. doesnt say anything. I am on WINNT m/c .. I checked in.. My Computer Environment variable though.. There I guess we have two types of variables -- System Variables and User Variable..

In User Variable I have a variable called TEMP as well as TMP.. Both has a value of C:\TEMP.. If I doubleclick on it.. it gives me the value of
%SystemDrive%\TEMP

I am kinnda confused..
1) what are System variable and User Variable?
2) TEMP and TMP.. whats the difference?
3) what does %SystemDrive%\TEMP means?
4) what is this % sign?

As you say ..programs sometimes crash and leave the file(s) behind. It seems to me .. program Like Flash-- from Macromedia also crashes.. and always leave a file in my temp folder..

Would really appreciate this help

Best Regards
0
Creating Instructional Tutorials  

For Any Use & On Any Platform

Contextual Guidance at the moment of need helps your employees/users adopt software o& achieve even the most complex tasks instantly. Boost knowledge retention, software adoption & employee engagement with easy solution.

 
LVL 6

Expert Comment

by:bartsmit
ID: 2530488
%systemdrive% is a variable that is expanded by NT to point to the system drive (usually c:)

System variables are the same for all users while user variables are user specific.

Since you share this folder with other users on the same machine, you cannot delete all the files.

TEMP and TMP are the two environment variables that programs may use to find out where to place their temporary files.

If the machine is running low on disk space then you should ask an administrator to clear out the temp folder. If not, just leave it ;-)

BTW I assumed you were using win98 since this is the win98 forum...
0
 

Author Comment

by:rnarang98
ID: 2531455
Thanks for the reply. Sorry for posting WINNT query in WIN98.. Firstly that was my mistake .. Sorry about that.. and then I didn't find any WINNT discussion forum.. anyway.. sorry for this.. I would appreciate if you can clarify me a little bit more for which I am increasing my points on this question..

When you say TEMP and TMP are two different env. variables.. Where in application do we mention which env variable to look for ..  

why 2 variables when anyway they are pointing to same dir   c:\temp

does windows put files in temp dir or any specific application..

if application -- why application need to put anything in temp dir?? and actually what does it usually puts in there?

if windows -- why does windows need to put anything in temp dir

i make an application say a JAVA APPLET..now where do i mention to put anything in temp dir? why should i do that? and what should i put in temp dir actually?

I would really appreciate if you can clarify on these issues as well..

Best Regards
0
 

Author Comment

by:rnarang98
ID: 2531456
Adjusted points to 100
0
 
LVL 6

Expert Comment

by:bartsmit
ID: 2532898
TEMP and TMP are just conventions for programmers from the dark days of DOS programs. Instead of assuming that an application was free to create temp files in its own directory the software developers would look at the variables to see if there was a preferred directory. This would allow the application directory to be made read-only as well.

NT follows these conventions and assigns the TEMP directory on the system drive to these variables. both are needed because not everybody agreed on the name of the variable.

Temp files are needed for lots of reasons. If you open a file for editing, it is good practice for the application to make a temporary copy and operate on that. This ensures that the original is safe if the user decides to discard the editing session.

Windows creates temp files for many reasons. Don't forget that 'windows' is really a GUI with a suite of small applications (wordpad, paint, etc.)

Java applets are a bit different since they a) usually don't work with documents and b) won't have access to the file system since they operate in the Java sandbox which doesn't allow access to files.

If you write an *application* in java, then you'll find that you'll need to create temporary files as well.
0

Featured Post

Free Tool: Site Down Detector

Helpful to verify reports of your own downtime, or to double check a downed website you are trying to access.

One of a set of tools we are providing to everyone as a way of saying thank you for being a part of the community.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

If you get continual lockouts after changing your Active Directory password, there are several possible reasons.  Two of the most common are using other devices to access your email and stored passwords in the credential manager of windows.
While rebooting windows server 2003 server , it's showing "active directory rebuilding indices please wait" at startup. It took a little while for this process to complete and once we logged on not all the services were started so another reboot is …
As developers, we are not limited to the functions provided by the VBA language. In addition, we can call the functions that are part of the Windows operating system. These functions are part of the Windows API (Application Programming Interface). U…
Windows 8 comes with a dramatically different user interface known as Metro. Notably missing from the new interface is a Start button and Start Menu. Many users do not like it, much preferring the interface of earlier versions — Windows 7, Windows X…

730 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