another query - thought id put it in a new topic in case anyone else does a search in the future for this:
var
fullpathsrc: string;
fullpathdest: string;
begin
copyfile(pchar(fullpathsrc), pchar(fullpathdest), false)
end;
if either fullpathsrc or fullpathdest contain an apostrophe above the procedure fails to copy the file. I'm guessing this is because in pascal strings are terminated by an apostrophe, but is there a way around it - since Windows allows the use of an apostrophe in a filename?
One counter to my above assertion is that if you do a showmessage(fullpathdest) it shows the whole string not just up to the first apostrophe as I would have expected. Leading me to think it could also be to do with the PChar conversion?
I have done my own research - but nobody else seems to have had this problem. Loads of articles explain how to use CopyFile (eg
http://www.swissdelphicenter.ch/torry/showcode.php?id=101) but none seem to explain how to get around this?
Thanks again for any help
