PDA

View Full Version : انتقال فایل



delphi5
پنج شنبه 16 شهریور 1385, 09:32 صبح
سلام


چطور میتونم فایلهای داخل یک دایرکتوری رو یکجا به یک دایرکتوری دیگه انتقال بدم

delphi5
پنج شنبه 16 شهریور 1385, 10:17 صبح
uses ShellApi;
---
procedure Tform21.ShellFileOperation(fromFile: string; toFile: string; Flags: Integer);
var
disc: TSHFileOpStructA;
begin
with disc do
begin
wnd := Application.Handle;
wFunc := Flags;
pFrom := PChar(fromFile);
pTo := PChar(toFile);
end;
SHFileOperation(disc);
end;


--
procedure TForm21.BitBtn2Click(Sender: TObject);
begin
ShellFileOperation(Source directory+'\*.*',Destination Directory, FO_MOVE);
ShowMessage('Done !');
end;

Amir Lajevardi
پنج شنبه 16 شهریور 1385, 10:27 صبح
فکر کنم جوابت رو اینجا بگیری:
http://barnamenevis.org/forum/showthread.php?t=8758&highlight=folder