Government Security
Network Security Resources

Jump to content

Photo

Read Txt In Cmd


  • Please log in to reply
3 replies to this topic

#1 MaRtO

MaRtO

    Private First Class

  • Members
  • 32 posts

Posted 20 June 2006 - 10:38 AM

Hello,

Do you have any idea how to read txt files in cmd?
I have an app called edit.exe, but that's for dos only.

Thx ;)

#2 tg-xi

tg-xi

    Private

  • Members
  • 1 posts

Posted 20 June 2006 - 10:41 AM

type c:\bla.txt

#3 kroylar

kroylar

    Private First Class

  • Members
  • 51 posts

Posted 20 June 2006 - 10:58 AM

And if it's too long for the screen...
TYPE c:\bla.txt |MORE


#4 jacco

jacco

    Private First Class

  • Members
  • 58 posts

Posted 20 June 2006 - 01:53 PM

If you want to be able to edit a text file you could use the "edlin" command.
It's located in %windir%/system32

Usage:
edlin yourfile.txt
use the L command to list the file content
use W followed by a linenumber to replace a line
use the E command to save the file

Example:
C:\>edlin test.txt
Einde invoerbestand
*l
	   1:*This is an example file
	   2: This file has 3 lines of text
	   3: Aint that funn!!!
*w 1
	   1:*This is an example file
	   1:*This is the first line of my example text file
*e

C:\>

Greetingz,
Jacco




0 user(s) are reading this topic

0 members, 0 guests, 0 anonymous users