How do i move a folder from delphi source? I know how to move a file with movefile. I could create a new folder and do a movefile for every file inside the original folder and then delete that folder. Or is there a smarter way to do this?
How do i move a folder from delphi source? I know how to move a file with movefile. I could create a new folder and do a movefile for every file inside the original folder and then delete that folder. Or is there a smarter way to do this?
http://3das.noeska.com - create adventure games without programming
SHFileOperation gives you all you want and more. For example:
[pascal]uses
ShellAPI;
procedure TForm1.Button1Click(Sender: TObject);
var
blah: TSHFileOpStruct;
begin
blah.Wnd := 0;
blah.wFunc := FO_COPY;
blah.pFrom := pchar('e:\unrar\temp');
blah.pTo := PChar('e:\unrar\temp2');
blah.fFlags := FOF_NOCONFIRMMKDIR;
blah.hNameMappings := nil;
blah.lpszProgressTitle := nil;
SHFileOperation(Blah);
end;[/pascal]
Have a look in the win32 help files for all the flags and stuff you can use -- there are plenty (e.g. cool progress dialogues and such).
"All paid jobs absorb and degrade the mind."
<br />-- Aristotle
thanks!
http://3das.noeska.com - create adventure games without programming
Bookmarks