Checking if a file exists in VBDOS... IF LEN(DIR$("PATH\TO\FILE.TXT")) <> 0 THEN PRINT "File exists!" ELSE PRINT "File does not exist." END IF ...or the other way around... IF LEN(DIR$("PATH\TO\FILE.TXT")) = 0 THEN PRINT "File does not exist." ELSE PRINT "File exists!" END IF And of course, you can replace the PRINT parts with whatever you want. If you are wondering if this would work in QB45, then the answer is no. QB45 does not have the DIR$ function. However, if your goal is to not create a graphical program but still want to use something like QB45, you can still use VBDOS without creating any forms and you get extra built-in functions with more RAM access.