![]() |
Ganzen Ordner kopieren + prüfen auf Datum
Hallo,
ich bin ein Anfänger und bräuchte Hilfe bei meinem Delphi 7 problem. Ich möchte einen Ordner von A nach B kopieren. Sollte der Ordner schon vorhanden sein, soll er nur Datei kopieren, die sich geändert haben (nach Datum). Ist das Möglich und wenn ja, wie? Vielen Dank schonmal im vorraus... :) //Edit: Bitte entschuldigt, ich bin ausversehen in das falsche Forum gerutsch, wenn Möglich bitte ins richtige Forum schieben. :wall: |
Re: Ganzen Ordner kopieren + prüfen auf Datum
|
Re: Ganzen Ordner kopieren + prüfen auf Datum
Hallo,
also ich habe durch die Suche diesen Code gefunden:
Delphi-Quellcode:
Nun muss halt noch die Überprüfung der Datein, ob das Datum unterschiedlich ist, eingebaut werden.
function DoFileWork(aOperation: FILEOP_FLAGS; aFrom, aTo: AnsiString;
Flags: FILEOP_FLAGS): Integer; var FromPath, ToPath: AnsiString; SHFileOpStruct: TSHFileOpStruct; begin FromPath := aFrom + #0#0; ToPath := aTo + #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 Result := SHFileOperationA(SHFileOpStruct); end; |
Alle Zeitangaben in WEZ +1. Es ist jetzt 11:53 Uhr. |
Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
LinkBacks Enabled by vBSEO © 2011, Crawlability, Inc.
Delphi-PRAXiS (c) 2002 - 2023 by Daniel R. Wolf, 2024 by Thomas Breitkreuz