| 1. |
Solve : Did you ever use EdLin?? |
|
Answer» Did you ever use EdLin? Or anything like it? Edlin is the only thing I know of in DOS that can take a command line arguments beyond just the file name. err... I must be confused as to what you mean, since Dir can take a filename and switches, and almost any other command, sich as Find or fc, takes arguments other then filenames. one use of an edlin script would be to skip lines, or process text in a line based fashion. (make a file with every second line, or third line, for example)Quote err... I must be confused as to what you mean, since Dir can take a filename and ... Story. I meant as a text replacement editor. ATTRIB, COPY, DIR, FC, and so on I would not use to edit a text file. But what do I know? May be one can edit a file with the FOR command. Sometimes I want to do a massive replacement of a few strings in a array of HTML files I work with. It would be nice if edlin could just take parameters from the command line and do a whole bunch of files in nested batch files. Not having much success with it, I wrote a small file in QBASIC that does the job in an seasick kind of way. If edlin is a neat and versatile alternative, I might prefer that. I would try the FOR command, that really makes me seasick. edit takes a filename, THOUGH. so does notepad.Hello BC. Sorry, I did not make myself clear. I did not mean to say other things can not be started from the command line. Rather I want to have a batch file the can process a large number of text files. Somewhere else I found a reverence to Edlin as the thing you would use in a batch file. The batch file will give STUFF to the text editor. For Edlin the general form is: Edlin source-file Where source-tile is a text file to be read. Where command-list is a file of commands and things. ahh, so what you mean, is that while edit and so forth take filenames and can open them, you can't actually say, modify the file through batch, and that's what your looking to do with edlin? That makes sense, I think I gotcha now Quote modify the file through batch, and that's what your looking to do with Edlin?Yeah. You got what I mean. Don't pay attention to what I say, just what I mean. Most of the pre-GUI programs all took input from the thing called STDIN. When you start a CMD or otherwise get into DOS, all input goes via STDIN and the batch program has the authority to filter the stream. So things like %1 %2 %3 and so on are expanded into values that suit the moment. This allows the use of loops or serial re-entry or whatever it is they call that. That way you could have a 100 slightly different HTML files and each could get the same or different STRING replacements. The replacements would be in a list of pairs. I guess you can do that in Word. but I don't know how and I am a slow learner. But I have yet to master it in Edlin. I think what is going to stick me is the CTRL-Z thing that Edlin wants. I think in Windows 2000 there is an option to fix that. |
|