Hey,
Does anyone know how the KILL (delete) command works? I'm a newbie, please be nice.
Brentis ::)
Qbasic KILL Command?
Moderators:Administrator, Global Moderator
Re: Qbasic KILL Command?
You can use it in a couple different ways:
KILL "C:\TEMP\FILENAME.TXT"
. . . or use a variable:
file$ = "C:\TEMP\FILENAME.TXT"
KILL file$
. . . or build a variable:
path$ = "C:\TEMP\"
filename$ = "mytext.txt"
file$ = path$ + filename$
KILL file$
Artie
KILL "C:\TEMP\FILENAME.TXT"
. . . or use a variable:
file$ = "C:\TEMP\FILENAME.TXT"
KILL file$
. . . or build a variable:
path$ = "C:\TEMP\"
filename$ = "mytext.txt"
file$ = path$ + filename$
KILL file$
Artie
Re: Qbasic KILL Command?
Thanks. But, can you modify/access text files in Quick Basic?
------------------------------
Hacker. Programmer. Dude. Psycho. For real.
11 years old?!?!?
0-0-0-0-0-0-0-0-0-0-0-0
All squirrels are evil. They throw acorns at me.
Visit http://www.anti-squirrel.com.
------------------------------
Hacker. Programmer. Dude. Psycho. For real.
11 years old?!?!?
0-0-0-0-0-0-0-0-0-0-0-0
All squirrels are evil. They throw acorns at me.
Visit http://www.anti-squirrel.com.
Re: Qbasic KILL Command?
You can modify/access/delete any file using QuickBASIC.
Whatever path & filename you put in quotes after the KILL command will be deleted.
You can open or modify a file using the various forms of the OPEN command.
If you want, just try it. Make a dummy file of whatever you want using an editor, give it any name and path, then "KILL" it using QB.
Whatever path & filename you put in quotes after the KILL command will be deleted.
You can open or modify a file using the various forms of the OPEN command.
If you want, just try it. Make a dummy file of whatever you want using an editor, give it any name and path, then "KILL" it using QB.