Delphi-PRAXiS
Seite 1 von 6  1 23     Letzte »    

Delphi-PRAXiS (https://www.delphipraxis.net/forum.php)
-   Win32/Win64 API (native code) (https://www.delphipraxis.net/17-win32-win64-api-native-code/)
-   -   Delphi Kann man auch Ordner kopieren??? (https://www.delphipraxis.net/8631-kann-man-auch-ordner-kopieren.html)

maximi 9. Sep 2003 11:07


Kann man auch Ordner kopieren???
 
Hallo!
Man kann ja mit CopyFile() Dateien kopieren, gibts denn auch etwas, womit man Ordner kopieren kann???

Max

sakura 9. Sep 2003 11:22

Re: Kann man auch Ordner kopieren???
 
Ja, gibt es :-)

http://www.delphipraxis.net/internal...ect.php?t=1451

...:cat:...

maximi 9. Sep 2003 12:30

Re: Kann man auch Ordner kopieren???
 
Vielleicht ist das( http://www.delphipraxis.net/topic145...rationen+mit+s ... ation.html) ja eine super Erklärung für mein Problem, aber ich versteh es einfach nicht.

maximi 9. Sep 2003 12:49

Re: Kann man auch Ordner kopieren???
 
Hat irgendjemand denn noch ne Lösung für mein Problem?

Matze 9. Sep 2003 12:50

Re: Kann man auch Ordner kopieren???
 
Schau dir doch Sakura's Link an! :twisted:

sakura 9. Sep 2003 13:11

Re: Kann man auch Ordner kopieren???
 
So, ich habe das Problem mal ergänzt und einen weiteren Beitrag angehangen, der sollte helfen ;-)

http://www.delphipraxis.net/internal...?p=68850#68850

...:cat:...

maximi 9. Sep 2003 15:42

Re: Kann man auch Ordner kopieren???
 
So ich hab jetzt mal ein Code erstellt, aber mit dem kopieren klappts immer noch nicht!!

Code:
unit Unit1;

interface

uses
  Windows, Messages, SysUtils, Variants, Classes, Graphics, Controls, Forms,
  Dialogs, StdCtrls,ShellApi;

type
  TForm1 = class(TForm)
    Button1: TButton;
    procedure Button1Click(Sender: TObject);

  private
    { Private-Deklarationen }
  public
    { Public-Deklarationen }
  end;

var
  Form1: TForm1;

implementation

{$R *.dfm}





procedure TForm1.Button1Click(Sender: TObject);
 var
  FromPath, ToPath: WideString;
  SHFileOpStruct: TSHFileOpStruct;
  aOperation: FILEOP_FLAGS; aFrom, aTo: AnsiString;
    Flags: FILEOP_FLAGS;
begin
  FromPath := 'c:\asd.jpg'#0#0;
  ToPath := 'e:\asd.jpg'#0#0;
  with SHFileOpStruct do
  begin
    Wnd := 0;
    wFunc := aOperation;
    pFrom := PAnsiChar(FromPath);
    if ToPath <> '' then
    begin
      pTo := PAnsiChar(ToPath)
    end else begin // target available
      pTo := nil;
    end; // target not available
    fFlags := Flags;
  end; // structure


end;

end.

Max

sakura 9. Sep 2003 15:49

Re: Kann man auch Ordner kopieren???
 
Da fehlt die letzte, aber alles entscheidene Zeile :mrgreen:

Delphi-Quellcode:
if SHFileOperationA(SHFileOpStruct); = 0 then
  ShowMessage('ja')
else
  ShowMessage('nö');
...:cat:...

sakura 9. Sep 2003 16:00

Re: Kann man auch Ordner kopieren???
 
Liste der Anhänge anzeigen (Anzahl: 1)
Hier mal ein Beispiel-ZIP.

Der Ordner "C:\Temp\Chart" wird nach "E:\" kopiert.

...:cat:...

seno 20. Dez 2007 22:11

Re: Kann man auch Ordner kopieren???
 
ich habe es nun alles am laufen... doch es gibt noch eine kleine feinheit.. kann man es auch irgendwie machen, dass, wenn etwas kopiert wird, dies nicht im fenster angezeigt wird, sondern im hintergrund kopiert wird?
hoffe ihr könnt mir helfen ;)

vielen dank im voraus

mfg
seno


Alle Zeitangaben in WEZ +1. Es ist jetzt 06:25 Uhr.
Seite 1 von 6  1 23     Letzte »    

Powered by vBulletin® Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
LinkBacks Enabled by vBSEO © 2011, Crawlability, Inc.
Delphi-PRAXiS (c) 2002 - 2023 by Daniel R. Wolf, 2024 by Thomas Breitkreuz