Re: Delphi CopyFile command
Posted by webmaster Guido on April 05, 19103 at 14:01:17:
In Reply to: CopyFile command posted by sam sgling07 on April 04, 19103 at 15:39:18:
: Someone please help me on this as well.
COPYFILE expects parameters of the type PChar, not strings. So you have to convert the strings to PChar. Example:
var Source, Destination, mPath1, mPath2: string; ... begin ... Source := mPath1 + 'xxx'; Destination := mPath2 + 'yyy'; CopyFile(PChar(Source),PChar(Destination),...); ... end;