Solved

Win 98 Temp Directory

Posted on 2000-02-16
7
258 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
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
  • 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
Why Off-Site Backups Are The Only Way To Go

You are probably backing up your data—but how and where? Ransomware is on the rise and there are variants that specifically target backups. Read on to discover why off-site is the way to go.

 
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

Online Training Solution

Drastically shorten your training time with WalkMe's advanced online training solution that Guides your trainees to action. Forget about retraining and skyrocket knowledge retention rates.

Question has a verified solution.

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

This article summaries thoughts and ideas from two years of sustained use. It provides good reasoning to make the jump to Windows 10.
Determining the an SCCM package name from the Package ID
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 10 is mostly good. However the one thing that annoys me is how many clicks you have to do to dial a VPN connection. You have to go to settings from the start menu, (2 clicks), Network and Internet (1 click), Click VPN (another click) then fi…

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