반응형
Procedure CopyFiles(Files, DestDir : String);
var
CopyFiles: TSHFileOpStruct;
begin
FillChar(CopyFiles, SizeOf(CopyFiles), 0);
with CopyFiles do
begin
Wnd := 0;
wFunc := FO_COPY;
pFrom := PChar(Files + #0#0);
pTo := PChar(DestDir + #0#0);
fFlags := FOF_NOCONFIRMATION Or FOF_RENAMEONCOLLISION;
fAnyOperationsAborted := False;
hNameMappings := nil;
lpszProgressTitle := Nil;
end;
SHFileOperation( CopyFiles );
end;
Files는 현재 폴더 이고...
DestDir은 카피할 폴더 입니다..
폴더가 없으면 만들어 줍니다...
var
CopyFiles: TSHFileOpStruct;
begin
FillChar(CopyFiles, SizeOf(CopyFiles), 0);
with CopyFiles do
begin
Wnd := 0;
wFunc := FO_COPY;
pFrom := PChar(Files + #0#0);
pTo := PChar(DestDir + #0#0);
fFlags := FOF_NOCONFIRMATION Or FOF_RENAMEONCOLLISION;
fAnyOperationsAborted := False;
hNameMappings := nil;
lpszProgressTitle := Nil;
end;
SHFileOperation( CopyFiles );
end;
Files는 현재 폴더 이고...
DestDir은 카피할 폴더 입니다..
폴더가 없으면 만들어 줍니다...
반응형