Results 1 to 3 of 3

Thread: move a folder from delphi source?

  1. #1

    move a folder from delphi source?

    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

  2. #2

    move a folder from delphi source?

    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

  3. #3

    move a folder from delphi source?

    thanks!
    http://3das.noeska.com - create adventure games without programming

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •