>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).
HTH.
Larry Miller
MCSD
LWMiller3@verizon.netAccumulate learning by study, understand what you learn by questioning. -- Mingjiao