Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
How do you change a folder name programatically?
Message
Information générale
Forum:
Visual FoxPro
Catégorie:
Fonctions Windows API
Divers
Thread ID:
00186345
Message ID:
00186471
Vues:
12
>Does anyone know how to change a folder name from within a VFP program? I've been told that it can only be done through the Windows API. (Please provide an example. I'm not that familiar with the syntax when using the API.)
>Thank you
Hi Jay,

If you don't have the Windows Scripting host, you can use:
DECLARE SHORT MoveFile IN Win32API;
   STRING @lpcurrentname, STRING @lpnewname
* lcoldname is the current name of the directory
* lcnewname is the new name for the directory
* llresult will be .T. if the function succeeded.
llresult = (MoveFile(@lcoldname, @lcnewname) # 0)
hth,
George

Ubi caritas et amor, deus ibi est
Précédent
Suivant
Répondre
Fil
Voir

Click here to load this message in the networking platform