Solved

Win 98 Temp Directory

Posted on 2000-02-16
7
250 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
Comment Utility
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
Comment Utility
Adjusted points to 50
0
 

Author Comment

by:rnarang98
Comment Utility
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
Free Trending Threat Insights Every Day

Enhance your security with threat intelligence from the web. Get trending threat insights on hackers, exploits, and suspicious IP addresses delivered to your inbox with our free Cyber Daily.

 
LVL 6

Expert Comment

by:bartsmit
Comment Utility
%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
Comment Utility
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
Comment Utility
Adjusted points to 100
0
 
LVL 6

Expert Comment

by:bartsmit
Comment Utility
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

What Is Threat Intelligence?

Threat intelligence is often discussed, but rarely understood. Starting with a precise definition, along with clear business goals, is essential.

Join & Write a Comment

If you Lost your Administrator password for Windows XP, Vista, or 7 this CD will help you reset the password to blank so you can log in. Once in you should change that blank password to something!! Download the ISO on this page http://www.spl…
Today, still in the boom of Apple, PC's and products, nearly 50% of the computer users use Windows as graphical operating systems. If you are among those users who love windows, but are grappling to keep the system's hard drive optimized, then you s…
This video Micro Tutorial explains how to clone a hard drive using a commercial software product for Windows systems called Casper from Future Systems Solutions (FSS). Cloning makes an exact, complete copy of one hard disk drive (HDD) onto another d…
With the advent of Windows 10, Microsoft is pushing a Get Windows 10 icon into the notification area (system tray) of qualifying computers. There are many reasons for wanting to remove this icon. This two-part Experts Exchange video Micro Tutorial s…

743 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

12 Experts available now in Live!

Get 1:1 Help Now