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 Rugxulo Homepage, Usono, 20.12.2012, 21:10

> So I copied the text of your batch file into a file called ONELINE.BAT and
> then copied that file over to my little laptop running MS-DOS.
>
> 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.

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 can only guess that you didn't tell it what filename. Try using OUTER.BAT (below) instead, and see if that works better.


@echo off
REM outer.bat
for %%a in (*.txt) do call oneline.bat %%a

 

Complete thread:

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