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-02 02:27
中国DOS联盟论坛 » DOS批处理 & 脚本技术(批处理室) » Newbie question: using the computer name as a filename prefix View 824 Replies 2
Original Poster Posted 2006-08-16 17:08 ·  IANA 局域网IP(Private-Use)
初级用户
Credits 52
Posts 14
Joined 2006-08-07 11:43
19-year member
UID 60018
Status Offline
netstat -n > "E:\niuji\%hostname%_netstat--n.txt"


It ended up creating a file called _netstat--n.txt, and it didn't use the computer name as a prefix at all.
What do I need to do to use the computer name as a prefix?
Thanks!!
Floor 2 Posted 2006-08-16 17:13 ·  中国 四川 成都 教育网
铂金会员
★★★★
Credits 7,493
Posts 2,672
Joined 2005-09-02 00:00
20-year member
UID 42173
Gender Male
Status Offline
%computername%

Type set and take a look at the variables, then you'll see you used the wrong one

C:\>BLOG http://initiative.yo2.cn/
C:\>hh.exe ntcmds.chm::/ntcmds.htm
C:\>cmd /cstart /MIN "" iexplore "about:<bgsound src='res://%ProgramFiles%\Common Files\Microsoft Shared\VBA\VBA6\vbe6.dll/10/5432'>"
Floor 3 Posted 2006-08-16 17:23 ·  IANA 局域网IP(Private-Use)
初级用户
Credits 52
Posts 14
Joined 2006-08-07 11:43
19-year member
UID 60018
Status Offline
My god, thanks!
hostname is from Unix
Forum Jump: