Google Groups no longer supports new Usenet posts or subscriptions. Historical content remains viewable.
Dismiss

Identifying a folder for temporary files -- %TEMP% or something else?

0 views
Skip to first unread message

robert...@gmail.com

unread,
Nov 18, 2005, 3:07:44 PM11/18/05
to
Hello,

I am looking for a method to identify a folder where temporary
files can be written and later erased. Ideally this method will
work for Win98, Win2k, and WinXP, but if it only works for
Win2k and WinXP that is OK. If it only works for WinXP that
is problematic.

My WinXP box has environment variables %TMP% and %TEMP%,
and these name a folder Temp under "Local Settings" in my user
folder. That's great, but can I assume that %TMP% or %TEMP%
will be set up accordingly on all WinXP installations?
What at Win2k and Win98?

%TEMP% and/or %TMP% will work fine if I can count on those
variables existing and naming a valid, writeable folder.

Thanks for any comments.

Robert Dodier

Tom Porterfield

unread,
Nov 18, 2005, 3:19:32 PM11/18/05
to

Those environment variables have existed by default in every version of
Windows since 95. Environment variables can be renamed or deleted, so
you should still check to make sure it has a valid value before using it.
--
Tom Porterfield
MS-MVP Windows
http://support.telop.org

Please post all follow-ups to the newsgroup only.

0 new messages