中国DOS联盟论坛

China DOS Union

-- Unite DOS · Advance DOS · Grow DOS --
Union site: www.cn-dos.net Forum site: www.cn-dos.net/forum
Guest | Log in | Register | Members | Search | China DOS Union
中国DOS联盟论坛
The time now is 2026-08-04 00:00
48,038 topics / 350,123 posts / today 0 new / 48,251 members
DOS批处理 & 脚本技术(批处理室) » Variable question
Printable Version  638 / 11
Floor1 hkymadmin Posted 2007-04-03 22:46
初级用户 Posts 19 Credits 44
The following batch file
C:\
cd \
dir /s /b XXX.exe >xxx.txt
What I mean is, set the contents of XXX.txt as variables in this batch file

[ Last edited by hkymadmin on 2007-4-3 at 11:26 AM ]
Floor2 hkymadmin Posted 2007-04-03 22:53
初级用户 Posts 19 Credits 44
Thanks
Floor3 hkymadmin Posted 2007-04-03 22:53
初级用户 Posts 19 Credits 44
Please help....
Floor4 ccwan Posted 2007-04-03 23:18
金牌会员 Posts 1,160 Credits 2,725 From 河北廊坊
I don't quite understand what the OP wants
Floor5 hkymadmin Posted 2007-04-04 00:22
初级用户 Posts 19 Credits 44
What I mean is, set the contents of XXX.txt as variables in this batch file
Floor6 NaturalJ0 Posted 2007-04-04 00:35
银牌会员 Posts 533 Credits 1,181
OP, use for /f ... in ('...') do ...
Floor7 lxmxn Posted 2007-04-04 00:37
版主 Posts 4,938 Credits 11,386

I don't understand it either, so I can't answer.
Floor8 hkymadmin Posted 2007-04-04 02:32
初级用户 Posts 19 Credits 44
Originally posted by NaturalJ0 at 2007-4-3 11:35 AM:
OP, use for /f ... in ('...') do ...

Could you explain it in detail????
Floor9 a201341717 Posted 2007-04-04 02:38
贫困用户 Posts 20 Credits -2
Floor10 NaturalJ0 Posted 2007-04-04 02:51
银牌会员 Posts 533 Credits 1,181
Floor11 hkymadmin Posted 2007-04-05 00:10
初级用户 Posts 19 Credits 44
Originally posted by NaturalJ0 at 2007-4-3 01:51 PM:
for /f "delims=" %%i in ('dir/s/b c:\hosts 2^>nul') do @echo %%i

Could you leave your contact information??? I still don't quite understand it
Floor12 lxmxn Posted 2007-04-05 01:07
版主 Posts 4,938 Credits 11,386
[ Contact the Union admin team - 中国DOS联盟 - Standard version ]
Sponsored by ifanr Inc | © 2001–2023