ELSE : SHFN$ = MID$(line$, 53): LGFN$ = "" ' found short name only
END IF
IF cnt% MOD 25 = 0 THEN ' pause every 25 files
COLOR 14: LOCATE 29, 27 "Press a key for more files!"
DO: LOOP UNTIL INKEY$ <> ""
CLS: COLOR 14: LOCATE 2, 4: PRINT Header$
END IF
COLOR 11: LOCATE (cnt% MOD 25) + 3, 4
{{Cl|PRINT USING}} tmp$; DIR$; SHFN$; LGFN$
LOCATE (cnt% MOD 25) + 3, 58: PRINT last$
END IF
LOOP
END IF
COLOR 10: LOCATE {{Cl|CSRLIN}} + 1, 27 "Total folders and files ="; cnt%
CLOSE #1
END SUB
{{CodeEnd}}
''Explanation:'' The above routine can also be used to place the file name info into string arrays by using the count variable cnt% to determine the index. Long file names are normally returned by '''QB64'''. To keep older QBasic programs compatible, you may want to only use the short names when displaying the files on the screen.