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 » Sun Feb 15, 2004 1:00 am

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 » Sun Feb 15, 2004 8:06 pm

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 » Tue Mar 02, 2004 6:18 am

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 » Tue Mar 02, 2004 2:29 pm

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