Err ...dont mean to be a pain but MID$by UnseenMachine (no login)i want to compare a the return of a LINE INPUT # with a fixed length string.... i have DIM FC AS INTEGER, FLNME AS STRING * 5, DIREC AS STRING, DRVE AS STRING, CHKN AS STRING * 5 DEFINT X-Z SCREEN 12: COLOR 15: X = 1: Y = 1: CLS DO LOCATE 3, 10: PRINT "Enter first 5 letters of files you wish to view : ", : INPUT ""; FLNME LOOP UNTIL FLNME$ > "" FC = 0 DO LOCATE 5, 10: PRINT "ENTER DRIVE LETTER :"; : INPUT "", DRVE$ LOOP UNTIL DRVE$ > "" OPEN "C:\FILELST.BAT" FOR OUTPUT AS #1 PRINT #1, "CD\" PRINT #1, "DIR %1 > C:\FLIST.LST /A /S /W /B" PRINT #1, "CLS" CLOSE #1 SHELL "C:\FILELST.BAT" OPEN "C:\FLIST.LST" FOR INPUT AS #1 DO WHILE NOT EOF(1) LINE INPUT #1, DIREC2$ MID$(DIREC2$, 1, 6) = CHKN IF CHKN = FLNME THEN LOCATE X, Y: PRINT DIREC2$ LOOP CLOSE #1 The file dump bit will be removed eventually, but for now i would just like to be able to fill the screen will all the files that match...i work on it from there...UNSEEN |
| Response Title | Author and Date |
| * You are comparing a 6 character string to a 5 fixed length string. | on Dec 2 |
| Re: Err ...dont mean to be a pain but MID$ | Laanan Fisher on Dec 2 |
| * Geesh, you can be a pain! Did you NOT read my post? | on Dec 2 |
| * Nope. | Laanan Fisher on Dec 2 |