Autor Beitrag
Nomis
ontopic starontopic starontopic starontopic starontopic starontopic starontopic starontopic star
Beiträge: 72



BeitragVerfasst: Sa 07.09.02 09:45 
Hallo Ich möchte in einer Procedure eine Bestimmte Datei von der Festplatte C: in ein anderes Verzeichniss Kopieren C:\Backup. Dabei soll die datei x.db von C: in dem Verzeichnis
C:\Backup\Das aktuelle Datum (evt. wenn schon vorhanden 1,2,3 usw.)\ x.db

heißen kann mir da jemand ´den Code geben ? (Währe echt lieb von euch)

Schon mal Danke

Gruß Simon
MathiasSimmack
Ehemaliges Mitglied
Erhaltene Danke: 1



BeitragVerfasst: Sa 07.09.02 10:06 
Schau mal hier :roll:
Nomis Threadstarter
ontopic starontopic starontopic starontopic starontopic starontopic starontopic starontopic star
Beiträge: 72



BeitragVerfasst: Sa 07.09.02 18:45 
Ist schwer da was zu finden. Möchte nämlich nur eine Datei von einem verzeichniss ins andere Kopieren wenn ich einen Button klicke, die anderen Beiträge sind alle (für mich) zu kompliziert.
gibt es nicht so einen einfachen code

copy c:\... x.db nach c:\Backup\x.db ?

Gruß Simon (Sorry bin halt anfänger)
b.brecht
ontopic starontopic starontopic starontopic starontopic starontopic starontopic starontopic star
Beiträge: 81



BeitragVerfasst: Sa 07.09.02 21:59 
Ganz simpel:

ausblenden Quelltext
1:
CopyFile(PChar('C:\Bla\test.exe'), PChar('C:\Bla2\test.exe), False);					
Nomis Threadstarter
ontopic starontopic starontopic starontopic starontopic starontopic starontopic starontopic star
Beiträge: 72



BeitragVerfasst: So 08.09.02 10:07 
Titel: Danke
Danke Dir Funktioniert super :D
Nomis Threadstarter
ontopic starontopic starontopic starontopic starontopic starontopic starontopic starontopic star
Beiträge: 72



BeitragVerfasst: Mo 09.09.02 15:54 
Kann das sein, daß der Code

ausblenden Quelltext
1:
CopyFile(PChar('C:Buch\...'), PChar('C:\Buch\Backup\...'), False);					


nicht unter Win 95 Läuft, das Creatdir macht er auch auf Win 95
Aber die Dateien kopieren Nicht.
Peti
ontopic starontopic starontopic starontopic starontopic starontopic starontopic starontopic star
Beiträge: 42



BeitragVerfasst: Di 24.09.02 08:38 
Vielleicht existiert die Datei bei Dir schon?

Das Flag "False" bedeutet, dass bestehende Dateien nicht überschrieben werden sollen. "True" würde bestehende Dateien überschreiben.

Gruß,
Peti
Nomis Threadstarter
ontopic starontopic starontopic starontopic starontopic starontopic starontopic starontopic star
Beiträge: 72



BeitragVerfasst: Di 24.09.02 16:05 
Nein die gibt es noch nicht.
Ist halt win 95 :(

Na ja danke trotzdem für eure Ideen