02-01-2024, 11:19 PM
(02-01-2024, 04:28 PM)Steffan-68 Wrote:(02-01-2024, 06:17 AM)PhilOfPerth Wrote: Using some of the bits and pieces I've learned from this forum, I built the small prog below.And if you change the last line E.g
Not earth-shattering, but I'm quite proud of it. It lets me see the contents of any of my drives.
Code: (Select All)Screen _NewImage(1200, 820, 32)
SetFont: f& = _LoadFont("C:\WINDOWS\fonts\courbd.ttf", 24, "monospace"): _Font f&
fontsize = 24
_ScreenMove (_DesktopWidth - _Width) / 2, 86 ' centre display on screen
botline = _Height / _FontHeight - 2
Print "Drive letter (a to z)?"
Print "Esc to finish"
GetDrive: dl$ = UCase$(InKey$)
If dl$ = Chr$(27) Then System
If dl$ < "A" Or dl$ > "Z" Then GoTo GetDrive
comd$ = "dir " + dl$ + ":\ " + " > temp.txt"
Print comd$
Shell comd$
Open "temp.txt" For Input As #1
Do Until EOF(1)
Line Input #1, text$
Print text$
If CsrLin > botline Then Print "More...": Sleep: Cls
Loop
Print "Press a key":: Sleep: Cls: Run
Print "Press a key": Sleep: Cls: Close #1: Kill ".\temp.txt": Run
Would you delete the TEMP file at the end .
Yes, thanks Stefan. Two of my many crimes are forgetting to close files, and to remove them.
Of all the places on Earth, and all the planets in the Universe, I'd rather live here (Perth, W.A.)
Please visit my Website at: http://oldendayskids.blogspot.com/
Please visit my Website at: http://oldendayskids.blogspot.com/