Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
How do you change a folder name programatically?
Message
General information
Forum:
Visual FoxPro
Category:
Windows API functions
Miscellaneous
Thread ID:
00186345
Message ID:
00186471
Views:
14
>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
Previous
Next
Reply
Map
View

Click here to load this message in the networking platform