Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Temporary Positions..
Message
 
To
20/02/2011 11:08:46
General information
Forum:
Visual FoxPro
Category:
Coding, syntax & commands
Environment versions
Visual FoxPro:
VFP 9 SP2
OS:
Windows 7
Network:
Windows 2008 Server
Database:
Visual FoxPro
Application:
Desktop
Miscellaneous
Thread ID:
01500936
Message ID:
01500945
Views:
91
>Hi All,
>
>What's the correct syntax to return the path of the logged-in user's temporary folder.
>%TEMP% works in the config file for VFP temp files, but I need to do other stuff there.
>Thanks.
>
>Luke
CLEAR
*** Using WSH, this works:
#DEFINE TEMPORARYFOLDER 2
oFS=CREATEOBJECT('Scripting.FileSystemObject')
? oFS.GetSpecialFolder(TEMPORARYFOLDER).Path

*** Using an API call, this also works:
DECLARE LONG GetTempPath IN WIN32API LONG nBufferLength, STRING lpBuffer
lcBuffer = SPACE(255)
lnRetval = GetTempPath(LEN(lcBuffer), @lcBuffer)
? LEFT(lcBuffer,AT(CHR(0), lcBuffer) - 1)
_______________________________________________________________
Testing displays the presence, not the absence of bugs.
If a software application has to be designed, it has to be designed correctly!
_______________________________________________________________
Vladimir Zografski
Systems Analyst
Previous
Reply
Map
View

Click here to load this message in the networking platform