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:
00395265
Views:
15
>>Hi,
>>
>>How can I rename a directory from inside VFP6? I suppose is via the API but don't know how to do it.
>>
>>Thanks.
>
>You can use the Scripting.FileSystemObject to do this. Take a look at www.microsoft.com/scripting/default.htm?/scripting/vbscript/default.htm for more inforamtion. The WSH provides a COM interface to many of the WinAPI functions.
>
>Or you could use to use the WinAPI directly:

>Declare Integer MoveFile in "Kernel32" String lpOldName, String lpNewName
>lret = MoveFile("OldDirName","NewDirName")
>return lret > 0 && 0 means failure
>
>You can not rename a directory so it appears on a different volume (drive).
>

Thanks Larry,

But with this I must depend if the WSH is installed, do you know to that with the API? Thanks
Pablo Roca
Clavo Congelados, S.A. (La Coruna - Spain)
Sysop of PortalFox

Join MasFoxPro campaign
http://www.masfoxpro.com
Previous
Next
Reply
Map
View

Click here to load this message in the networking platform