KILL(pathname)

Deletes an existing file.


pathnameThe full pathname of the file to be deleted (String).

REMARKS
* This subroutine supports the use of wildcards (*, ?). Can it be used to remove whole directories.
* This statement cannot be used to delete read only files.
* If you try to delete a file that does not exist you will get a run-time error.
* If you try to delete a file that is currently open you will get a run-time error.
* You can delete whole directories or folders using the RMDIR statement.
* The equivalent .NET function is Microsoft.VisualBasic.FileSystem.Kill
* For the Microsoft documentation refer to docs.microsoft.com

Kill "C:\Temp\FileName.txt" 
Kill "C:\Temp\".txt"

© 2020 Better Solutions Limited. All Rights Reserved. © 2020 Better Solutions Limited Top