#Include once "window9.bi"

Function RenameDir(ByVal SourseDirName As String,ByVal NewDirName As String,ByVal flag As Integer) As Integer Export
  Dim As String*3000 From_ = SourseDirName+Chr(0)
  Dim As String*3000  To_   = NewDirName+Chr(0)
  Dim As SHFILEOPSTRUCT op
  ZeroMemory(@op, sizeof(op))
  op.hwnd  = 0
  op.wFunc = FO_RENAME
  op.pFrom = Cast(LPSTR,@From_)
  op.pTo   = Cast(LPSTR,@To_)
  op.fFlags= flag
  Return SHFileOperation( @op)
End Function
