Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Rename a directory!
Message
Information générale
Forum:
Visual FoxPro
Catégorie:
Codage, syntaxe et commandes
Versions des environnements
Visual FoxPro:
VFP 6
OS:
Windows XP SP2
Database:
Visual FoxPro
Divers
Thread ID:
00976806
Message ID:
01058909
Vues:
42
>Hi Everybody,
>
>Is there any command in VFP which can change the name (rename) of a directory?
>
>Thank you,

Ali,

A couple of ways

There's the Windows Script Host
oFSO = CREATEOBJECT('Scripting.FileSystemObject')
oFolder = oFSO.GetFolder(lcdir)
oFolder.Name = lcname
or the API way
DECLARE SHORT MoveFile IN Win32API;
  STRING @lpExistingFileName, STRING @lpNewFileName
? MoveFile(@lcOldName, @lcNewName)
If the result is non-zero the function succeeded.
George

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

Click here to load this message in the networking platform