Writing to a text file

Discussion forum for all Windows batch related topics.

Moderator: DosItHelp

Post Reply
Message
Author
mor.bas
Posts: 66
Joined: 25 Apr 2012 04:28

Writing to a text file

#1 Post by mor.bas » 03 Jun 2012 02:20

Hi
I have a program that writing data to a txt file.
How can I manipulate the data output in the txt file (Bold text,text in color...)?
Thanks in Adavnce.

foxidrive
Expert
Posts: 6031
Joined: 10 Feb 2012 02:20

Re: Writing to a text file

#2 Post by foxidrive » 03 Jun 2012 03:04

If you are displaying it in a web browser then you need to use HTML.

mor.bas
Posts: 66
Joined: 25 Apr 2012 04:28

Re: Writing to a text file

#3 Post by mor.bas » 03 Jun 2012 05:18

I don't need it it web browser just to manipulate the text file itself

aGerman
Expert
Posts: 4741
Joined: 22 Jan 2010 18:01
Location: Germany

Re: Writing to a text file

#4 Post by aGerman » 03 Jun 2012 05:58

foxidrive is more or less right. A txt file is just plain text. You don't have any additional information for formatting. You need a markup language (such as HTML, LaTex or RTF) and a programm (like a browser in case of HTML) that is able to parse and to interpret these formatting informations.

Regards
aGerman

foxidrive
Expert
Posts: 6031
Joined: 10 Feb 2012 02:20

Re: Writing to a text file

#5 Post by foxidrive » 03 Jun 2012 07:55

Just to add some extra info: there are methods to colour text as it is printed to the console, but you will need to write code to echo your file in exactly the way you want it shown on the screen.

Search this forum for the thread about colouring/coloring text.

Here is one thread:

viewtopic.php?f=3&t=3248

Post Reply