Socko,
I made a program that finds all the current filesin the current directory. I saved every file name as a variable so you could just check the name of your file with each variable. The only problem with this is that it saves the name as the DOS short names instead of the long windows name that you may give to it.
The code is not exactly the best readable but it should work.
DIM d$(300)
CLS
'the y$ variable is the directory you want to find the
'files of and the z$ variable is where to write the names
'of all the files
'If you want the current directory just get rid of the
'next 3 lines
y$ = "cd\windows"
z$ = "cd\windows\desktop\family\qbasic"
SHELL y$
SHELL "dir > dir.tem"
OPEN "dir.tem" FOR INPUT AS #1
a$ = INPUT$(LOF(1), 1)
a = LOF(1)
CLOSE #1
SHELL "del dir.tem"
b = 5
FOR x = 1 TO a
b$ = MID$(a$, x, 3)
IF r = 1 THEN c$ = MID$(a$, x - 1, 5)
r = 1
IF a - 9 > 0 THEN IF LTRIM$(RTRIM$(c$)) = b$ THEN IF VAL(LTRIM$(RTRIM$(c$))) = 0 THEN IF (LTRIM$(RTRIM$(c$))) = UCASE$((LTRIM$(RTRIM$(c$)))) THEN b = b + 1: d$(b) = MID$(a$, x - 9, 12)
NEXT x
CLS
z = 0
FOR x = 1 TO b
IF z > 23 THEN z = 23
IF LTRIM$(d$(x)) = MID$(d$(x), 10, 3) THEN zx = 1
NEXT x
FOR x = 1 TO b
FOR y = 1 TO 9
IF MID$(d$(x), 1, y) = RTRIM$(MID$(d$(x), 1, y + 1)) THEN e$ = MID$(d$(x), 1, y)
NEXT y
f$ = MID$(d$(x), 10, 3)
CLS
d$(x) = e$ + "." + f$
IF d$(x) = "." THEN d$(x) = ""
NEXT x
FOR x = 1 TO b
FOR y = 1 TO b
IF d$(x) < d$

THEN SWAP d$(x), d$

NEXT y
NEXT x
SHELL z$
' You can get rid of the last part because all it does is
' write the variables to a file and prints them
FOR x = 1 TO b
PRINT d$(x),
NEXT x
OPEN "dir.tem" FOR OUTPUT AS #1
WRITE #1, b
FOR x = 1 TO b
WRITE #1, d$(x)
NEXT x
CLOSE #1
Like i said before, I don't really like to comment my code for other people to read so well. I can understand what I am doing and that is good enough for me. If you don't understand anything you can e-mail me at:
SBecker08@att.net