Discussion forum for all Windows batch related topics.
Moderator: DosItHelp
-
phillid
- Posts: 109
- Joined: 03 Apr 2010 20:27
- Location: Wellington, New Zealand
-
Contact:
#1
Post
by phillid » 31 May 2010 22:33
Hello all. I've been trying to set one of my batch files screen output so it is easier to read. I've decided to have tables made out of + - | etc, but I encountered a problem:
This didn't work because the | is meant to be used like:
So I put a ^ like this:
This still doesn't work.
Please Help!
Thanks,
Phillid
-
aGerman
- Expert
- Posts: 4678
- Joined: 22 Jan 2010 18:01
- Location: Germany
#2
Post
by aGerman » 01 Jun 2010 11:24
What exactly does output mean? Your standard output is the the batch window. The pipe (|) is for redirecting the stdOut of one command to a second command.
Regards
aGerman
-
phillid
- Posts: 109
- Joined: 03 Apr 2010 20:27
- Location: Wellington, New Zealand
-
Contact:
#3
Post
by phillid » 01 Jun 2010 18:38
I mean It will put something like the following on-screen:
Code: Select all
+--TITLE--+
|Data |
|Data |
+---------+
But I stuffs-up when trying to echo a |
-
DosItHelp
- Expert
- Posts: 239
- Joined: 18 Feb 2006 19:54
#4
Post
by DosItHelp » 01 Jun 2010 19:27
Code: Select all
@echo off
for %%A in (
"+--TITLE--+"
"|Data |"
"|Data |"
"+---------+"
) do echo.%%~A
DosItHelp?
-
aGerman
- Expert
- Posts: 4678
- Joined: 22 Jan 2010 18:01
- Location: Germany
#6
Post
by aGerman » 02 Jun 2010 14:51
Another possibility could be to use frame characters. Try this
Code: Select all
@echo off &setlocal
chcp 437>nul
echo.
echo ÉÍËÍ»
echo º1º2º
echo ÌÍÎ͹
echo º3º4º
echo ÈÍÊͼ
echo.
echo ÚÄÂÄ¿
echo ³1³2³
echo ÃÄÅÄ´
echo ³3³4³
echo ÀÄÁÄÙ
echo.
pause
Regards
aGerman