China DOS Union

-- Unite DOS · Advance DOS · Grow DOS --

Union site: www.cn-dos.net Forum site: www.cn-dos.net/forum
DOS stands for freedom, openness and progress. Let us work hard, learn from the openness and GNU spirit of FreeDOS and Linux, and together build and grow a free GNU GPL world!

中国DOS联盟论坛
The time now is 2026-07-04 20:24
中国DOS联盟论坛 » DOS批处理 & 脚本技术(批处理室) » How can I read novels with a batch file? View 754 Replies 2
Original Poster Posted 2008-09-06 21:53 ·  中国 江苏 苏州 昆山市 电信
初级用户
★★
Credits 133
Posts 75
Joined 2008-08-03 01:08
17-year member
UID 122677
Gender Male
Status Offline
Make a P file. When I want to read a novel (a txt file), I can just drag the file onto P and then read the novel. P's background has some colors that are easier on the eyes, so it's better for reading novels. (What I said above is for reading novels at work; reading in plain text isn't good for the eyes.) Can this be done?
Floor 2 Posted 2008-09-06 22:36 ·  中国 浙江 杭州 电信
初级用户
★★
Credits 192
Posts 72
Joined 2005-07-31 21:10
20-year member
UID 41234
Status Offline
Not a bad idea

[ Last edited by obsolete on 2008-9-6 at 10:40 PM ]
Floor 3 Posted 2008-09-06 22:38 ·  中国 重庆 九龙坡区 电信
版主
★★★★★
Credits 9,023
Posts 5,017
Joined 2007-05-31 19:39
19-year member
UID 89899
Gender Male
Status Offline
Adjust the colors yourself.
@echo off
color 70
more "%~f1"
pause

C:\Test>color /?
Sets the default console foreground and background colors.

COLOR

attr Specifies color attribute of console output

Color attributes are specified by TWO hex digits -- the first
corresponds to the background; the second the foreground. Each digit
can be any of the following values:

0 = Black 8 = Gray
1 = Blue 9 = Light Blue
2 = Green A = Light Green
3 = Aqua B = Light Aqua
4 = Red C = Light Red
5 = Purple D = Light Purple
6 = Yellow E = Light Yellow
7 = White F = Bright White


If no argument is given, this command restores the color to what it was
when CMD.EXE started. This value either comes from the current console
window, the /T command line switch or from the DefaultColor registry
value.

The COLOR command sets ERRORLEVEL to 1 if an attempt is made to execute
the COLOR command with a foreground and background color that are the
same.

Example: "COLOR fc" produces light red on bright white
Forum Jump: