>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