Qbasic KILL Command?

Please use this Board for QBasic related requests ( file research, programming, etc.)

Moderators: Administrator, Global Moderator

Post Reply
Guest

Qbasic KILL Command?

Post by Guest »

Hey,

Does anyone know how the KILL (delete) command works? I'm a newbie, please be nice.

Brentis  ::)
Artie
Jr. Member
Posts: 23
Joined: Fri Feb 06, 2004 12:48 am
Location: Florida
Contact:

Re: Qbasic KILL Command?

Post by Artie »

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
Guest

Re: Qbasic KILL Command?

Post by Guest »

Thanks. But, can you modify/access text files in Quick Basic?
Image
------------------------------
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.
Artie
Jr. Member
Posts: 23
Joined: Fri Feb 06, 2004 12:48 am
Location: Florida
Contact:

Re: Qbasic KILL Command?

Post by Artie »

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.
Post Reply