Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
VFP/Scripting Host (Shell Object) tip
Message
Information générale
Forum:
Visual FoxPro
Catégorie:
Autre
Divers
Thread ID:
00292982
Message ID:
00294036
Vues:
278
You can eliminate both the animation and prompt to overwrite by using the FileSystemObject's CopyFile method in Windows Scripting Host:

fso = CreateObject("Scripting.FileSystemObject")
FSO.CopyFile("c:\somefolder\somefile.dbf", "c:\")

>>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
kenweber
GCom2 Solutions
Microsoft Certified Professional

Précédent
Suivant
Répondre
Fil
Voir

Click here to load this message in the networking platform