Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Renaming a directory
Message
 
General information
Forum:
Visual FoxPro
Category:
Windows API functions
Miscellaneous
Thread ID:
00395201
Message ID:
00395750
Views:
9
>How can I rename a directory from inside VFP6? I suppose is via the API but don't know how to do it.

Try using rename() from the C++ runtime:

Declare Integer rename in MSVCRT.dll As _rename String @oldname, String @newname
md c:\foo
lsOld = "c:\foo"
lsNew = "c:\newfoo"
_rename(@lsOld, @lsNew)

Note that you have to alias the function name because VFP already has a RENAME command.
Mike Stewart
Previous
Next
Reply
Map
View

Click here to load this message in the networking platform