Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
accessing the CLI in a prog
#2
Usually the easiest way is to juust pipe the results into a text file and then read it back into your program.

SHELL "c:\dir > temp.txt"         <-- this runs that shell command to C:\DIR and then pipes the output to "temp.txt".

OPEN "temp.txt" FOR INPUT AS #1
DO UNTIL EOF(1)
    LINE INPUT #1, text$
    PRINT text$
LOOP

^And then something similar to the above will read that file and print the results to the screen.
Reply


Messages In This Thread
accessing the CLI in a prog - by PhilOfPerth - 01-31-2024, 01:31 AM
RE: accessing the CLI in a prog - by SMcNeill - 01-31-2024, 01:45 AM
RE: accessing the CLI in a prog - by bplus - 01-31-2024, 01:48 AM
RE: accessing the CLI in a prog - by TerryRitchie - 01-31-2024, 02:02 AM
RE: accessing the CLI in a prog - by PhilOfPerth - 01-31-2024, 10:50 AM
RE: accessing the CLI in a prog - by SMcNeill - 01-31-2024, 11:48 AM
RE: accessing the CLI in a prog - by PhilOfPerth - 01-31-2024, 11:08 PM
RE: accessing the CLI in a prog - by GareBear - 01-31-2024, 04:08 PM
RE: accessing the CLI in a prog - by bplus - 01-31-2024, 06:05 PM
RE: accessing the CLI in a prog - by GareBear - 01-31-2024, 07:28 PM
RE: accessing the CLI in a prog - by SMcNeill - 01-31-2024, 09:57 PM
RE: accessing the CLI in a prog - by GareBear - 02-01-2024, 01:24 AM
RE: accessing the CLI in a prog - by SMcNeill - 02-01-2024, 01:31 AM
RE: accessing the CLI in a prog - by DSMan195276 - 02-01-2024, 01:59 AM
RE: accessing the CLI in a prog - by GareBear - 02-01-2024, 03:32 AM
RE: accessing the CLI in a prog - by PhilOfPerth - 02-01-2024, 06:17 AM
RE: accessing the CLI in a prog - by Steffan-68 - 02-01-2024, 04:28 PM
RE: accessing the CLI in a prog - by PhilOfPerth - 02-01-2024, 11:19 PM



Users browsing this thread: 5 Guest(s)