[Gambas-user] Move ... Kill function (File & Directory Functions)

Hans Lehmann hans at gambas-buch.de
Sun Sep 23 16:01:58 CEST 2018


Hello Fabien,

thank you very much for the short explanation - fits.
The function chain 'MOVE OldName KILL NewName' obviously replaces the 
following source code:

If Not (Exist(sDestinationPath & sFileName)) Then
    Try Copy sSourcePath &/ sFileName To sDestinationPath &/ sFileName
Else
    Kill sDestinationPath &/ sFileName
    Try Copy sSourcePath &/ sFileName To sDestinationPath &/ sFileName
    If Error Then
       Message.Error("Error! " & Error.Text)
       Return
    Endif
Endif

Is this correct?

Yours sincerely

Hans


More information about the User mailing list