[fpc-pascal] FreePascal Windows - Force files to write to disk

Sandro Cumerlato sandro.cumerlato at gmail.com
Thu Mar 23 14:05:30 CET 2017


On 23 Mar 2017 11:34, "James Richters" <james at productionautomation.net>
wrote:

Thanks for the response, it got me on the right track and I got it working.




Happy to help you!

I originally did try “ instead of ‘ and have the same results.  I was using
‘  because of the example here: http://wiki.freepascal.org/CopyFile




> CopyFile('c:\autoexec.bat','c:\windows\temp\autoexec.bat.backup');

' delimiters are mandatory within this example because we are writing paths
as string parameters directly into the source code.

I believe that I should use both ' and " in case of spaces within paths:

CopyFile('"c:\my silly path\autoexec.bat"','"c:\windows\temp\my silly
path\autoexec.bat.backup"');

or is the CopyFile function smart enough to include delimiters
automatically?

Best regards,
Sandro Cumerlato
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.freepascal.org/pipermail/fpc-pascal/attachments/20170323/719dd50b/attachment.html>


More information about the fpc-pascal mailing list