Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Rename a directory!
Message
General information
Forum:
Visual FoxPro
Category:
Coding, syntax & commands
Environment versions
Visual FoxPro:
VFP 6
OS:
Windows XP SP2
Database:
Visual FoxPro
Miscellaneous
Thread ID:
00976806
Message ID:
01058909
Views:
39
>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
Previous
Reply
Map
View

Click here to load this message in the networking platform