KILL(pathname)

Deletes an existing file.


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

REMARKS
* This statement supports wildcards (? and *).
* This statement can 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 learn.microsoft.com

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

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