|
klot
初级用户
 
积分 168
发帖 22
注册 2004-11-18
状态 离线
|
『楼 主』:
批处理命令怎么自定义参数?
使用 LLM 解释/回答一下
批处理命令怎么自定义参数?
我平时用的就都是系统 的参数.要是希望自定义参数应该怎么做??比如我自己用批处理编个程序
是test.bat 我想给他加个参数怎么办??谢谢.谢谢
How to customize parameters in batch commands? I usually use only system parameters. If I want to customize parameters, how should I do it? For example, I made a program with a batch file called test.bat, and I want to add a parameter to it. Thanks. Thanks
|
|
2005-2-20 00:00 |
|
|
Climbing
铂金会员
       网络独行侠
积分 6962
发帖 2753
注册 2003-4-16 来自 河北保定
状态 离线
|
『第 2 楼』:
使用 LLM 解释/回答一下
多看老帖子,尤其是置顶帖子,不要只知道问。
Read more old posts, especially the sticky ones, don't just know to ask.
|

偶只喜欢回答那些标题和描述都很清晰的帖子!
如想解决问题,请认真学习“这个帖子”和“这个帖子”并努力遵守,如果可能,请告诉更多的人!
|
|
2005-2-20 00:00 |
|
|
DOSforever
金牌会员
     
积分 4639
发帖 2239
注册 2005-1-30
状态 离线
|
|
2005-2-20 00:00 |
|
|
klot
初级用户
 
积分 168
发帖 22
注册 2004-11-18
状态 离线
|
『第 4 楼』:
使用 LLM 解释/回答一下
??我太菜...还不是明白....请大家看看我这段程序:这个批处理文件名字是test.bat@echo off
IF "%1"=="o" goto ok
else goto no
: ok
echo dkfjlsfj>>ok.txt: no
echo dkfjlsfj>>no.txt我运行"test.bat o"但是程序没有进行选择.就把那2个行都执行了....不明白...
??I'm too noob... still don't understand.... Please everyone take a look at my this program: This batch file's name is test.bat
@echo off
IF "%1"=="o" goto ok
else goto no
: ok
echo dkfjlsfj>>ok.txt
: no
echo dkfjlsfj>>no.txt
I run "test.bat o" but the program didn't make a selection. Just executed both of those two lines.... Don't understand...
|
|
2005-2-22 00:00 |
|
|
chenhui530
高级用户
   
积分 772
发帖 273
注册 2004-10-23
状态 离线
|
『第 5 楼』:
使用 LLM 解释/回答一下
以下是引用klot在2005-2-22 11:00:25的发言:
??我太菜...还不是明白....请大家看看我这段程序:
这个批处理文件名字是test.bat
@echo off
IF "%1"=="o" goto ok
else goto no
: ok
echo dkfjlsfj>>ok.txt
: no
echo dkfjlsfj>>no.txt
我运行"test.bat o"
但是程序没有进行选择.就把那2个行都执行了....不明白...
你的批处理有问题更改如下:
@echo off
IF "%1"=="o" (goto ok) else (goto no)
: ok
echo dkfjlsfj>>ok.txt
goto end
: no
echo dkfjlsfj>>no.txt
:end
The following is a quote from klot's post on 2005-2-22 11:00:25:
??I'm too noob... still don't understand.... Please take a look at my program:
This batch file is named test.bat
@echo off
IF "%1"=="o" goto ok
else goto no
: ok
echo dkfjlsfj>>ok.txt
: no
echo dkfjlsfj>>no.txt
I run "test.bat o"
But the program didn't make a selection. Just executed both lines.... Don't understand...
Your batch has an issue. Change it as follows:
@echo off
IF "%1"=="o" (goto ok) else (goto no)
: ok
echo dkfjlsfj>>ok.txt
goto end
: no
echo dkfjlsfj>>no.txt
:end
|

http://www.msfans.net/bbs/ |
|
2005-2-22 00:00 |
|
|
Climbing
铂金会员
       网络独行侠
积分 6962
发帖 2753
注册 2003-4-16 来自 河北保定
状态 离线
|
『第 6 楼』:
使用 LLM 解释/回答一下
越改问题越多,楼上改过的只能运行在NT环境下。
The more I modify, the more problems there are. What the person upstairs modified can only run in the NT environment.
|

偶只喜欢回答那些标题和描述都很清晰的帖子!
如想解决问题,请认真学习“这个帖子”和“这个帖子”并努力遵守,如果可能,请告诉更多的人!
|
|
2005-2-22 00:00 |
|
|
31415926
初级用户
 
积分 110
发帖 3
注册 2005-2-22
状态 离线
|
『第 7 楼』:
使用 LLM 解释/回答一下
98下好象没有else啊
It seems there is no "else" in Windows 98 SE?
|
|
2005-2-22 00:00 |
|
|
klot
初级用户
 
积分 168
发帖 22
注册 2004-11-18
状态 离线
|
『第 8 楼』:
使用 LLM 解释/回答一下
谢谢大家的帮助!!!但是我就是嘴直.climbing你光说不做.还有那个帖子.到底是不是明白dos我很怀疑,有时间说这么多废话不如好好帮大家解决问题.我说的可能过分.还请原谅
Thanks everyone's help!!! But I'm just straightforward. Climbing, you just talk but don't do. And that post, I really doubt whether you understand DOS. It's better to help everyone solve problems well than to talk so much nonsense if you have time. What I said might be excessive. Please forgive me
|
|
2005-2-22 00:00 |
|
|
chenhui530
高级用户
   
积分 772
发帖 273
注册 2004-10-23
状态 离线
|
『第 9 楼』:
使用 LLM 解释/回答一下
98下的批处理@echo off
IF "%1"=="o" goto ok
goto no
: ok
echo dkfjlsfj>>ok.txt
goto end: no
echo dkfjlsfj>>no.txt:end
@echo off
IF "%1"=="o" goto ok
goto no
: ok
echo dkfjlsfj>>ok.txt
goto end
: no
echo dkfjlsfj>>no.txt
:end
|

http://www.msfans.net/bbs/ |
|
2005-2-22 00:00 |
|
|
Climbing
铂金会员
       网络独行侠
积分 6962
发帖 2753
注册 2003-4-16 来自 河北保定
状态 离线
|
『第 10 楼』:
使用 LLM 解释/回答一下
以下是引用klot在2005-2-22 16:51:09的发言:
谢谢大家的帮助!!!但是我就是嘴直.climbing你光说不做.还有那个帖子.到底是不是明白dos我很怀疑,有时间说这么多废话不如好好帮大家解决问题.我说的可能过分.还请原谅
或者我不懂DOS,但是我可以肯定的是只知道问不知道自己查老帖学习的人肯定学不到什么太有用的东西,因为很明显,你这样是缺乏刻苦学习精神的表现。
如果你稍微看一下置顶帖,就应该知道Climbing到底是不是爱说废话,光说不做的人。
The following is the statement made by klot on 2005-2-22 16:51:09:
Thank you all for your help!!! But I'm just outspoken. Climbing, you just talk but don't do. Also, I very much doubt whether that post - maker really understands DOS. It would be better to spend time helping everyone solve problems instead of talking so much nonsense. What I said may be excessive. Please forgive me
Or I don't understand DOS, but I can be certain that those who only know how to ask questions but don't know to check old threads for learning will definitely not learn anything too useful, because it's obvious that you are lacking in the spirit of hard - working study.
If you had taken a little look at the sticky posts, you should have known whether Climbing is the kind of person who talks nonsense and just talks but doesn't do.
|

偶只喜欢回答那些标题和描述都很清晰的帖子!
如想解决问题,请认真学习“这个帖子”和“这个帖子”并努力遵守,如果可能,请告诉更多的人!
|
|
2005-2-23 00:00 |
|