Difference between revisions of "KILL"
Jump to navigation Jump to search
|Line 1:||Line 1:|
The '''KILL''' statement deletes a path
The '''KILL''' statement deletes a path designated by a [[STRING]] value or variable.
|Line 6:||Line 6:|
* Filespec a literal or variable string path andfilename. '
* KILL fileprogram MUST [[CLOSE]] it first.
* If the path or file does not exist, a "File not found" errorwill result.
* If the path or file does not exist, a "File not found" error will result.
|Line 19:||Line 17:|
Revision as of 19:29, 3 July 2010
The KILL statement deletes a file on a relative path designated by a STRING value or variable.
- Syntax: KILL filespec$
- Filespec is a literal or variable string path and/or filename. Path is relative to program's current location.
- KILL cannot remove an OPEN file. The program MUST CLOSE it first.
- If the path or file does not exist, a "File not found" or "Path not found" error will result.
- WARNING: Use this statement carefully! There is no prompt for permission to continue!
Example: KILL "C:\Qbasic\data\2000data.dat"