1
1
Fork 0
mirror of https://github.com/QB64Official/qb64.git synced 2024-07-20 23:15:15 +00:00
qb64/internal/help/KILL.txt
Luke Ceddia b586eafd3b Integrated _BLINEINPUT into regular LINE INPUT for BINARY files
LINE INPUT will now use the faster method if passed a file handle
that has been opened FOR BINARY. As such, the _BLINEINPUT command
has been removed.

qb64.bas now takes advantage of this for reading from '$include files,
at least in Include Manager 1. Some tweaking of internal/source/main.txt
was required to get things into a sane state, so I'm holing off changing
the compiler any further so the auto-builder can make sure everything's
smoothed over.

Note: Everything should still compile as normal; I'm just being overcautious.
2014-07-27 00:06:17 +10:00

36 lines
1.3 KiB
Plaintext

The '''KILL''' statement deletes a file on a relative path designated by a [[STRING]] value or variable.
{{PageSyntax}}
:: KILL filespec$
* Filespec is a literal or variable string path and filename. Wildcards * and ? can be used but '''be careful!'''
::'''*''' denotes one or more wildcard letters of a name or extension
::'''?''' denotes one wildcard letter of a name or extension
* Path can be relative to program's current location or use an absolute path from the root drive.
* 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 Codes|error]] will result.
* [[SHELL]] ''"DEL /Q " + filename$'' does the same without a prompt or verification for wildcard deletions.
* [[SHELL]] ''"DEL /P " + filename$'' will ask for user verification.
* Cannot delete folders or directories! Use [[RMDIR]] to remove empty folders only!
* '''Warning! Files deleted in DOS or QB64 will NOT go to the Recycle Bin and they CANNOT be restored!'''
''Example:''
{{CodeStart}}
KILL "C:\Qbasic\data\2000data.dat"
{{CodeEnd}}
''See also:''
* [[RMDIR]], [[FILES]], [[SHELL]], [[OPEN]]
* [[CHDIR]], [[MKDIR]], [[NAME]]
* [[_FILEEXISTS]], [[_DIREXISTS]]
* [[DOS]], [[Batch Files]], [[DOS#DEL|DEL]]
{{PageNavigation}}