msdos commands

noonepab

New Member
basically I have A LOT of txt files in a folder, and need to get rid of some lines that are headnote and footnote. If I use word or other programs it messes up the format of the columns. I know I can do it in unix. however workign with what I got, i'm wondering is it possible in dos.

so far i can only think of

more test.txt +5 >> test.txt

to get rid of the headnote


any other ideas? to get the footnote, or to get at all the files in one fell swoop
 
What operating system are you running? Even in XP there are manual entries to rename separate files or list all files with one extension. For renaming the one you posted here you would go "rename test.txt +5 >> test.txt test.txt" and then press the enter key to see if that renames the file when in dos, thru a dos window, or in shutdown to msdos mode. Dir or dir/w *.txt will test.txt along with any other file with the "txt" extension. Even dir/p is one sommand that pauses the listing in a single column if the number of files exceeds what you can see on the screen. Del *.txt will delete all files in that folder with the identical extension in dos, dos window, and dos mode.

In Windows you can go up to the "VIEW" drop down menu and change options there to have file types separated where you can highlight and drag the selected files into the recycle bin or simply right clight and choose delete.
 
he's looking at removing x lines of file content not file names. As for removing the end of the file I don't think you can.
 
Back
Top