Tips:Where is TEMP

From sasCommunity
Jump to: navigation, search

Some security-focused administrators at client sites even restrict access to C:\temp. However they still support and provide full create and update rights at the windows environment variable %temp% which SAS refers to as !temp. rather than c:\temp, use !temp, for example as shown at right.

filename sparetxt '!temp\sparetxt.txt' ;

On my VISTA platform, this converts to

C:\Users\Peter Crawford\AppData\Local\Temp

When I really need to know the path that !temp refers to

%let tempPath = %sysget(temp) ;

Environment variable names are not case-sensitive on windows (unlike UNIX). Learn about assigning SAS Libraries Using Environment Variables at the SEE ALSO link below.


Submitted By peterC

....see also