Autor Beitrag
Licki
ontopic starontopic starontopic starontopic starontopic starontopic starontopic starofftopic star
Beiträge: 132

Knoppix, Win 95, Win 2000, Win NT, Win 98, Win XP
Delphi 3
BeitragVerfasst: Di 23.09.03 12:11 
Hi...

Wie immer habe ich ein Problem.

Ich benutze schon länger diese Funktion.

ausblenden Delphi-Quelltext
1:
RenameFile('test.txt', 'test' + Label1.Caption +'.txt');					


Dies geht ohne Probleme. Theoretisch müsste doch auch das selbe mit MoveFile klappen, oder? Ich bekomme aber den Fehler, das TChar und TStrings inkompatibel sind. Kann mir hier jemand helfen, weil ich verstehe nicht, dass es bei der Funktion RenamFile klappt und bei MoveFile nicht... :(

ausblenden Delphi-Quelltext
1:
MoveFile('test.txt', 'test' + Label1.Caption +'.txt');					


Liebe Grüße
Chris
patrick
ontopic starontopic starontopic starontopic starontopic starofftopic starofftopic starofftopic star
Beiträge: 1481

WIN2k, WIN XP
D6 Personal, D2005 PE
BeitragVerfasst: Di 23.09.03 12:32 
ganz einfach du must den string nur in pchar umwandeln:
ausblenden Delphi-Quelltext
1:
MoveFile(pchar('test.txt'), pchar('test' + Label1.Caption +'.txt'));					

_________________
Patrick
im zweifelsfall immer das richtige tun!!!
Licki Threadstarter
ontopic starontopic starontopic starontopic starontopic starontopic starontopic starofftopic star
Beiträge: 132

Knoppix, Win 95, Win 2000, Win NT, Win 98, Win XP
Delphi 3
BeitragVerfasst: Di 23.09.03 12:46 
Okay, wieder was dazugelernt. Hat geklappt, dank dir. :)