Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Access/Assign in COM Object?
Message
General information
Forum:
Visual FoxPro
Category:
Object Oriented Programming
Miscellaneous
Thread ID:
00481355
Message ID:
00481775
Views:
15
>And while you're reading (grin), do you know what the difference is between the two? It looks like they return the same thing (I know you are a VBScript guru):
>
>
	Set oFSO = CreateObject("Scripting.FileSystemObject")
>	Set oShell = CreateObject("WScript.Shell")
>
>	TmpDir = oShell.Environment("Process")("Temp")
>	cFolder = oFSO.GetSpecialFolder(2)
>	WScript.Echo vbCRLF
>	WScript.Echo TmpDir
>	WSCript.Echo cFolder
VBScript guru? Me? Naw! I know a bit about the WSH and have dabbled in VBScript, but I'm not any sort of expert. What's below is purely a VFP perspective.

Right off the top, GetSpecialFolder returns a folder object not a string. Secondly the call to oShell.Enviroment returns an environment object. So, from within VFP we'd do
oEnvirn = oShell.Environment("Process")
? oEnvirn.Item("Tmp") && Returns the temporary directory
oFolder = oFSO.GetSpecialFolder(2)
? oFolder.Path && Returns the temporary directory as well
George

Ubi caritas et amor, deus ibi est
Previous
Reply
Map
View

Click here to load this message in the networking platform