Fwd: .BAT-programming

ZXNet echo conference «zxnet.pc»

From Kirill Frolov To Kirill Frolov 4 May 2004

- --- begin of forward --- From: Kirill Frolov Newsgroups: fido7.ru.dos Subject: Re: .BAT-programming Date: Tue, 4 May 2004 14:02:15 +0000 (UTC) X-Comment-To: Kirill Frolov Press RESET immediately, Kirill Frolov! On Tue, 4 May 2004 13:43:12 +0000 (UTC), Kirill Frolov wrote: KF> Vital question: how is a file containing a list of files KF> obtained by the command "dir /b", convert into a bat program, KF> where for each file from the list a certain third one would be called KF> batch file. That is, the input is: KF> file.1 KF> file2.txt KF> file3.com KF> ... KF> And at the output: KF> call x.bat file.1 KF> call x.bat file2.txt KF> call x.bat file3.com KF> I don’t know how! :~-( For single files you can get by with something like KF> of the following: KF> echo command %eof% > temp.bat KF> dir /b filename.ext >> temp.bat KF> call temp.bat KF> Here the variable %eof%, as I already wrote, contains a character with code x1a. KF> Dirty and ugly hack. And it doesn't fit everywhere. :-( I meant, of course, something a little more different: echo program.exe %eof% > temp.$$$ copy /a temp.$$$ temp.bat call temp.bat del temp.bat But this does not change the essence. And the use of edlin, by the way, is again hampered by the %eof% symbol. If it is available, it is possible to create an editing script... only now with copy /b -- for edlin, the function's input field separator search-replace is just Ctrl-Z used. - --- end of forward ---