Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Temporary Positions..
Message
 
À
20/02/2011 11:08:46
Information générale
Forum:
Visual FoxPro
Catégorie:
Codage, syntaxe et commandes
Versions des environnements
Visual FoxPro:
VFP 9 SP2
OS:
Windows 7
Network:
Windows 2008 Server
Database:
Visual FoxPro
Application:
Desktop
Divers
Thread ID:
01500936
Message ID:
01500945
Vues:
89
>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
Précédent
Répondre
Fil
Voir

Click here to load this message in the networking platform