Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Renaming a directory
Message
Information générale
Forum:
Visual FoxPro
Catégorie:
Fonctions Windows API
Divers
Thread ID:
00395201
Message ID:
00395265
Vues:
14
>>Hi,
>>
>>How can I rename a directory from inside VFP6? I suppose is via the API but don't know how to do it.
>>
>>Thanks.
>
>You can use the Scripting.FileSystemObject to do this. Take a look at www.microsoft.com/scripting/default.htm?/scripting/vbscript/default.htm for more inforamtion. The WSH provides a COM interface to many of the WinAPI functions.
>
>Or you could use to use the WinAPI directly:

>Declare Integer MoveFile in "Kernel32" String lpOldName, String lpNewName
>lret = MoveFile("OldDirName","NewDirName")
>return lret > 0 && 0 means failure
>
>You can not rename a directory so it appears on a different volume (drive).
>

Thanks Larry,

But with this I must depend if the WSH is installed, do you know to that with the API? Thanks
Pablo Roca
Clavo Congelados, S.A. (La Coruna - Spain)
Sysop of PortalFox

Join MasFoxPro campaign
http://www.masfoxpro.com
Précédent
Suivant
Répondre
Fil
Voir

Click here to load this message in the networking platform