[fpc-pascal] Problems with moving/renaming file using sysutils.renamefile

Jonas Maebe jonas.maebe at elis.ugent.be
Fri Feb 10 13:09:32 CET 2012


On 10 Feb 2012, at 12:19, Reinier Olislagers wrote:

> Trying to move a file (and rename it at the same time):
>
> //ExtractedCompiler is a string variable
> //BootstrapCompiler is a string property
> //I'm using my own version of debugln, not important here
> debugln('Going to rename/move ' + ExtractedCompiler + ' to ' +
> BootstrapCompiler);
> sysutils.DeleteFile(BootstrapCompiler); //ignore errors
> OperationSucceeded:=renamefile(ExtractedCompiler, BootstrapCompiler);

Renaming is not the same as moving. Renaming only works if source and  
destination are on the same volume.


Jonas
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.freepascal.org/pipermail/fpc-pascal/attachments/20120210/5d0716f1/attachment.html>


More information about the fpc-pascal mailing list