Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
VFP/Scripting Host (Shell Object) tip
Message
From
22/11/1999 10:55:39
 
General information
Forum:
Visual FoxPro
Category:
Other
Miscellaneous
Thread ID:
00292982
Message ID:
00293926
Views:
43
>>>>>>>Set winShell = CreateObject("Shell.Application")
>>>>>>>winShell.NameSpace("c:\Destination folder\").CopyHere "L:\Source folder\MyFile.dbf"
>>>>>>>Set winShell = Nothing
>>>>>>
>>>>>>This is an excellent tip, Igor. But you should have also pointed out that this function also uses the Windows file copy animation when copying large enough files. For anyone interested, Here is a VFP translation of the code to copy a file:
>>>>>>
>>>>>>oShell = CREATEOBJECT("Shell.Application")
>>>>>>oShell.NameSpace("c:\").CopyHere("c:\\somefolder\somefile.dbf")
>>>>>
>>>>>Hi Eric,
>>>>>
>>>>>Moreover, this function asks to confirm overwriting files too.
>>>>>
>>>>>Igor
>>>>I am trying to createobject and I have "Class not registered". Can you tell me what is wrong?
>>>
>>>Shell.Application requires that you have SHELL32.DLL version 4.71 or later on the target system. This rules out systems with WIn95 pre OSR2 that don't have IE installed, or NT 4.0 prior to NT SP3.
>>I have NT 4.0 with SP4 and IE 5.0
>>Mark
>
>Hi, Mark
>
>The simplest solution in your case is to re-instal windows scripting host. Go to web page http://msdn.microsoft.com/scripting/windowshost/download/default.htm
>

The Shell.Application is not part of the WSH, and WSH doesn't contain the SHELL32.DLL needed to update his system. Either his shell version is hosed, or his registry.
EMail: EdR@edrauh.com
"See, the sun is going down..."
"No, the horizon is moving up!"
- Firesign Theater


NT and Win2K FAQ .. cWashington WSH/ADSI/WMI site
MS WSH site ........... WSH FAQ Site
Wrox Press .............. Win32 Scripting Journal
eSolutions Services, LLC

The Surgeon General has determined that prolonged exposure to the Windows Script Host may be addictive to laboratory mice and codemonkeys
Previous
Reply
Map
View

Click here to load this message in the networking platform