Copy files with windows progress

, \t\t , How to copy multiple /large files and show the windows progress form.,,(Make sure ShellAPI is in your USES list),,, Source and Dest are both a list of files separated with #0, for example,,, WinCopyFile('c:\\1.txt' + #0 + 'c:\\2.txt', 'a:\\1.txt' + #0 + 'a:\\2.txt');,,, function WinCopyFile(Source, Dest: string): Boolean;,, var,, Struct : TSHFileOpStruct;,, Resultval: integer;,, begin,, ResultVal := 1;,, try,, Source := Source + #0#0;,, Dest := Dest + #0#0;,, Struct.wnd := 0;,, Struct.wFunc := FO_COPY;,, Struct.pFrom := PChar(Source);,, Struct.pTo := PChar(Dest);,, Struct.fFlags:= FOF_SIMPLEPROGRESS or FOF_NOERRORUI or FOF_NOCONFIRMATION; ,,, struct.fanyoperationsaborted: = falske,, struct.hnamemappings: = nul;,, resultval: = shfileoperation (atlanterhavet) og, endelig, resultat: = (resultval = 0),,,,,,,,



Previous:
Next Page: