Author: Jonas Bilinkevicius How to copy folders from one drive to another Answer: 1 uses 2 ShellAPI; 3 4 procedure CopyTree(dir, dest: string); 5 var 6 sfos: TSHFileOpStruct; 7 begin 8 FillChar(sfos, SizeOf(sfos), 0); 9 dir := dir + '\*.*'#0; 10 dest := dest + '\*.*'#0; 11 with sfos do 12 begin 13 wnd := 0; 14 wfunc := FO_COPY; 15 pFrom := PChar(dir); 16 pTo := PChar(dest); 17 fFlags := FOF_ALLOWUNDO or FOF_RENAMEONCOLLISION or FOF_SIMPLEPROGRESS; 18 fAnyOperationsAborted := false; 19 hNameMappings := nil; 20 lpszProgressTitle := nil 21 end; 22 SHFileOperation(sfos); 23 end;