kali Posted July 9, 2013 Posted July 9, 2013 I can make text file with command prompt and also add text to a file. But how to delete text line from text file I don't know. Is there any way to delete text line with DOS.
jaclaz Posted July 9, 2013 Posted July 9, 2013 (edited) I can make text file with command prompt and also add text to a file. But how to delete text line from text file I don't know. Is there any way to delete text line with DOS.Yes/No.Meaning that it is possible NOT to delete a line of text from a "plain txt" file, but it is possible to re-create the text file excluding a given line.There are two basic approaches, using FIND or FINDSTR (possibly with the /V parameter) to filter out some specific content or use MORE and FOR loops with ECHO (but you might need a batch file).There might be issues with "unicode" and with "special characters"including leading spaces, though.JFYI, there is NO real "DOS" in XP, there is it's Command Prompt (which uses a different command processor cmd.exe, than the actual DOS command processor command.com).It's similar, but not exactly the same.In any case the "default" programs are "limited", and you might find more useful adding a third party tool, like SED, see also this:jaclazP.S.: Oops, cross-posting with allen2 Edited July 9, 2013 by jaclaz
kali Posted July 11, 2013 Author Posted July 11, 2013 Meaning that it is possible NOT to delete a line of text from a "plain txt" file, but it is possible to re-create the text file excluding a given line.There are two basic approaches, using FIND or FINDSTR (possibly with the /V parameter) to filter out some specific content or use MORE and FOR loops with ECHO (but you might need a batch file).There might be issues with "unicode" and with "special characters"including leading spaces, though.Thanks jaclaz.I found same informations in online searching you wrote above. I'll follow your re-create text file. Thanks alos allen2.
Recommended Posts
Please sign in to comment
You will be able to leave a comment after signing in
Sign In Now