#include once "window9.bi"

Sub MoveDir(ByRef SourseDir As USTRING, ByRef NewDir As USTRING, ByVal flag As Long)  Export
	#ifdef UNICODE
		Dim As WString*3000 sFrom = **SourseDir+WChr(0)
		Dim As WString*3000  sTo   = **NewDir+WChr(0)
		Dim As SHFILEOPSTRUCT op
		ZeroMemory(@op, sizeof(op))
		op.pFrom = @sFrom
		op.pTo   = @sTo	
	#else	
		Dim As String*3000 sFrom = SourseDir+Chr(0)
		Dim As String*3000  sTo   = NewDir+Chr(0)
		Dim As SHFILEOPSTRUCT op
		ZeroMemory(@op, sizeof(op))
		op.pFrom = Cast(LPCSTR,@sFrom)
		op.pTo   = Cast(LPCSTR,@sTo)		
	#EndIf
	op.hwnd  = 0
	op.wFunc = FO_MOVE
	op.fFlags= CInt(flag)
	SHFileOperation( @op)
End Sub
