function MoverCarpeta(const carpetaOrigen,
carpetaDestion: string) : boolean;
var
FileOp: TSHFileOpStruct;
begin
FillChar(FileOp, SizeOf(FileOp),#0);
with FileOp do begin
wFunc := FO_MOVE;
Wnd := GetActiveWindow();
pTo := PChar(carpetaOrigen);
pFrom := PChar(carpetaDestion+#0#0);
fFlags := FOF_NOCONFIRMATION or FOF_SILENT
or FOF_ALLOWUNDO or FOF_NOERRORUI;
end;
if Win32Check((ShFileOperation(FileOp) = 0)) then
result := not FileOp.fAnyOperationsAborted
else
result := false;
end;