Difference between revisions of "KILL"

From QB64 Wiki
Jump to navigation Jump to search
imported>Clippy
Line 19: Line 19:




''See also:'' [[FILES]], [[SHELL]], [[OPEN]], [[CHDIR]], [[MKDIR]]
''See also:'' [[RMDIR]], [[FILES]], [[SHELL]], [[OPEN]], [[CHDIR]], [[MKDIR]]





Revision as of 01:37, 2 October 2009

The KILL statement deletes a file name designated by a STRING value or variable.


Syntax: KILL filespec$


  • Filespec can be a literal or variable string value.
  • The filespec can include an existing path to a different directory.
  • KILL does not ask for verification! Be careful! Don't delete empty files in the root directory or Windows!
  • To KILL a file it MUST be CLOSEd.
  • KILL does not verify that a file has been deleted. If the file did not exist, a "File not found" error will result.



Example: KILL "C:\Qbasic\data\2000data.dat"


See also: RMDIR, FILES, SHELL, OPEN, CHDIR, MKDIR


Navigation:

Go to Keyword Reference - Alphabetical

Go to Keyword Reference - By usage