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-08-04 12:10
中国DOS联盟论坛 » DOS批处理 & 脚本技术(批处理室) » [Help] Want to use a batch file to add content to Notepad View 908 Replies 4
Original Poster Posted 2007-05-04 18:33 ·  中国 江苏 苏州 电信
新手上路
Credits 6
Posts 2
Joined 2007-05-04 17:21
19-year member
UID 87465
Gender Female
Status Offline
I want to use a batch file to add content to Notepad

It would be best if it also lets the user choose and enter a specified path

The Notepad content is:
[sav]----------->this is fixed input
vt=specified path file
tv=specified path file

................................
For example

[sav]
vt=c:\1.txt
tv=d:\tv\2.txt
Floor 2 Posted 2007-05-04 18:44 ·  中国 陕西 西安 电信
铂金会员
★★★★
Credits 5,212
Posts 2,478
Joined 2007-02-08 23:39
19-year member
UID 79003
Gender Male
Status Offline
>>Also
set /p
Floor 3 Posted 2007-05-04 18:50 ·  中国 湖北 武汉 电信
初级用户
Credits 66
Posts 33
Joined 2007-04-28 11:32
19-year member
UID 86777
Gender Male
Status Offline
I want to know too.. could some expert give some guidance.... many thanks..........
Floor 4 Posted 2007-05-04 19:13 ·  中国 江苏 苏州 电信
新手上路
Credits 6
Posts 2
Joined 2007-05-04 17:21
19-year member
UID 87465
Gender Female
Status Offline
Could post #2 be a bit more specific?
Floor 5 Posted 2007-05-04 19:33 ·  中国 陕西 西安 电信
铂金会员
★★★★
Credits 5,212
Posts 2,478
Joined 2007-02-08 23:39
19-year member
UID 79003
Gender Male
Status Offline
@echo off
echo [sav] >T.txt
set /p vt=Please enter the path:
echo vt=%vt%>>T.txt
set /p tv=Please enter the path:
echo tv=%tv%>>T.txt
Forum Jump: