Solved

Win 98 Temp Directory

Posted on 2000-02-16
7
260 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
Salesforce Made Easy to Use

On-screen guidance at the moment of need enables you & your employees to focus on the core, you can now boost your adoption rates swiftly and simply with one easy tool.

 
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

Portable, direct connect server access

The ATEN CV211 connects a laptop directly to any server allowing you instant access to perform data maintenance and local operations, for quick troubleshooting, updating, service and repair.

Question has a verified solution.

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

An introduction to the wonderful sport of Scam Baiting.  Learn how to help fight scammers by beating them at their own game. This great pass time helps the world, while providing an endless source of entertainment. Enjoy!
Windows 10 Creator Update has just been released and I have it working very well on my laptop. Read below for issues, fixes and ideas.
The viewer will learn how to successfully create a multiboot device using the SARDU utility on Windows 7. Start the SARDU utility: Change the image directory to wherever you store your ISOs, this will prevent you from having 2 copies of an ISO wit…
This Micro Tutorial hows how you can integrate  Mac OSX to a Windows Active Directory Domain. Apple has made it easy to allow users to bind their macs to a windows domain with relative ease. The following video show how to bind OSX Mavericks to …

626 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