Back to home page

DOS ain't dead

Forum index page

Log in | Register

Back to the forum
Board view  Mix view

DOS utility to display 1st line of all files in directory? (Users)

posted by CluelessInSeattl, Seattle, USA, 28.12.2012, 17:42

I wrote:
> > But when I ran it, it only got as far as running QBASIC, which then
> flashed
> > briefly onto the screen for a only microsecond, and then the DOS prompt
> > gave me the "File not found" error.

You replied:

> QBASIC included with MS-DOS is only an interpreter. And it doesn't support
> features of the full QB4.5 compiler suite. One of those missing features is
> argc, argv support. So I had to use a workaround which relies on %MYFILE%
> being set before running it. ONELINE.BAT was supposed to handle that for
> you by using its own argument as the %MYFILE% value.

I'm afraid all of that went over my head. It's been well over a decade since I wrote any BASIC code or batch files, and in the meantime I've suffered severe memory loss and cognitive impairment. *sigh*

> I can only guess that
> you didn't tell it what filename.

Hmmm? At the DOS command line? Like this: ONELINE *.txt ?

> Try using OUTER.BAT (below) instead, and
> see if that works better.

Am I supposed to insert that into the ONELINE.BAT code, substitute it for something in the orignal file or run it as a standalone batch file?
>
>
> @echo off
> REM outer.bat
> for %%a in (*.txt) do call oneline.bat %%a
>

---
Will in Seattle
a.k.a. "Clueless"
Running MS-DOS 6.21

 

Complete thread:

Back to the forum
Board view  Mix view
22762 Postings in 2122 Threads, 402 registered users (0 online)
DOS ain't dead | Admin contact
RSS Feed
powered by my little forum