|
pusofalse
银牌会员
    
积分 1604
发帖 646
注册 2008-4-13
状态 离线
|
|
2008-11-12 18:35 |
|
|
lxmxn
版主
       
积分 11386
发帖 4938
注册 2006-7-23
状态 离线
|
|
2008-11-12 19:49 |
|
|
pusofalse
银牌会员
    
积分 1604
发帖 646
注册 2008-4-13
状态 离线
|
『第 3 楼』:
使用 LLM 解释/回答一下
赞佩!
|

心绪平和,眼藏静谧,无比安稳的火... Purification of soul...Just a false...^_^ |
|
2008-11-12 20:13 |
|
|
BC
中级用户
  
积分 338
发帖 175
注册 2007-10-21
状态 离线
|
|
2008-11-12 20:29 |
|
|
slore
铂金会员
      
积分 5212
发帖 2478
注册 2007-2-8
状态 离线
|
『第 5 楼』:
多cmd会……
使用 LLM 解释/回答一下
Microsoft Windows XP [版本 5.1.2600]
(C) 版权所有 1985-2001 Microsoft Corp.
C:\Documents and Settings\Administrator>"C:\Documents and Settings\Administrator
\桌面\123.bat"
双击运行
CommandLine
"C:\WINDOWS\system32\cmd.exe"
cmd /c ""C:\Documents and Settings\Administrator\桌面\123.bat" "
cmd /c ""C:\Documents and Settings\Administrator\桌面\123.bat" "
"C:\WINDOWS\system32\cmd.exe"
请按任意键继续. . .
Microsoft Windows XP
(C) Copyright 1985-2001 Microsoft Corp.
C:\Documents and Settings\Administrator>"C:\Documents and Settings\Administrator
\Desktop\123.bat"
Double-click to run
CommandLine
"C:\WINDOWS\system32\cmd.exe"
cmd /c ""C:\Documents and Settings\Administrator\Desktop\123.bat" "
cmd /c ""C:\Documents and Settings\Administrator\Desktop\123.bat" "
"C:\WINDOWS\system32\cmd.exe"
Press any key to continue. . .
|

S smile 微笑,L love 爱,O optimism 乐观,R relax 放松,E enthusiasm 热情...Slore |
|
2008-11-12 22:39 |
|
|
lxmxn
版主
       
积分 11386
发帖 4938
注册 2006-7-23
状态 离线
|
『第 6 楼』:
re slore:
使用 LLM 解释/回答一下
呵呵,特殊情况自然就没考虑那么多啦。
Hehe, special circumstances naturally didn't consider so much.
|
|
2008-11-13 11:00 |
|
|
tireless
银牌会员
    
积分 2025
发帖 1122
注册 2007-9-5
状态 离线
|
|
2008-12-6 01:01 |
|
|
523066680
银牌会员
     SuperCleaner
积分 2362
发帖 1133
注册 2008-2-2
状态 离线
|
『第 8 楼』:
使用 LLM 解释/回答一下
会变成经典的!虽然我不是刚来,不过还是灌水顶一下。
It will become a classic! Although I'm not new here, I still post to boost it.
|

综合型编程论坛
我的作品索引 |
|
2009-10-10 19:46 |
|
|
netbenton
银牌会员
     批处理编程迷
积分 1916
发帖 752
注册 2008-12-28 来自 广西
状态 离线
|
|
2009-10-10 21:56 |
|
|
plp626
银牌会员
     钻石会员
积分 2278
发帖 1020
注册 2007-11-19
状态 离线
|
『第 10 楼』:
使用 LLM 解释/回答一下
re:netbenton
兄的代码还稍欠考虑,系统变量cd有一个特殊情况就是根目录下最后一个字符不带"\",看来这点还是被不少人忽略啊
其实用cmdcmdline变量判断比较正统些。
re: netbenton
Brother's code still lacks consideration. There is a special case for the system variable cd that the last character in the root directory does not have "\". It seems that this point is still ignored by many people.
In fact, judging by the cmdcmdline variable is more orthodox.
|

山外有山,人外有人;低调做人,努力做事。
进入网盘(各种工具)~~ 空间~~cmd学习 |
|
2009-10-11 18:19 |
|
|
netbenton
银牌会员
     批处理编程迷
积分 1916
发帖 752
注册 2008-12-28 来自 广西
状态 离线
|
『第 11 楼』:
使用 LLM 解释/回答一下
再加一点呢?
@echo off&setlocal enabledelayedexpansion
set a0=%0
set a1="%cd%\%~nx0"
set a1=!a1:\\=\!
if !a0! equ !a1! (echo 双击运行) else (echo 命令行运行)
echo !a0!
echo !a1!
pause
What's a little more?
@echo off&setlocal enabledelayedexpansion
set a0=%0
set a1="%cd%\%~nx0"
set a1=!a1:\\=\!
if !a0! equ !a1! (echo Double-click to run) else (echo Run in command line)
echo !a0!
echo !a1!
pause
|

精简
=> 个人 网志  |
|
2009-10-11 19:42 |
|
|
plp626
银牌会员
     钻石会员
积分 2278
发帖 1020
注册 2007-11-19
状态 离线
|
|
2009-10-12 17:26 |
|
|
523066680
银牌会员
     SuperCleaner
积分 2362
发帖 1133
注册 2008-2-2
状态 离线
|
『第 13 楼』:
使用 LLM 解释/回答一下
cmd下调用……
C:\Documents and Settings\liubo\桌面>call a.bat
此时不应有 /c。
C:\Documents and Settings\liubo\桌面>@if ""C:\WINDO"=="cmd /c " (echo 双击) els
(echo 非双击)
C:\Documents and Settings\liubo\桌面>
(温馨提示,liubo不是我的名字,我不叫刘波…… 别恶搞我哈)
Last edited by 523066680 on 2009-10-12 at 17:49 ]
Calling in cmd...
C:\Documents and Settings\liubo\Desktop>call a.bat
There should not be /c at this time.
C:\Documents and Settings\liubo\Desktop>@if ""C:\WINDO"=="cmd /c " (echo Double-click) else (echo Not double-click)
C:\Documents and Settings\liubo\Desktop>
(Warm reminder, liubo is not my name, I don't call Liu Bo... Don't make fun of me ha)
Last edited by 523066680 on 2009-10-12 at 17:49 ]
|

综合型编程论坛
我的作品索引 |
|
2009-10-12 17:42 |
|
|
plp626
银牌会员
     钻石会员
积分 2278
发帖 1020
注册 2007-11-19
状态 离线
|
『第 14 楼』:
使用 LLM 解释/回答一下
健壮性待大家测试
@echo off
echo %cmdcmdline%|findstr/bc:"cmd /c """>nul&&echo 双击||echo 非双击
pause
Robust be tested by everyone
@echo off
echo %cmdcmdline%|findstr/bc:"cmd /c """>nul&&echo Double-clicked||echo Not double-clicked
pause
|

山外有山,人外有人;低调做人,努力做事。
进入网盘(各种工具)~~ 空间~~cmd学习 |
|
2009-10-12 18:17 |
|
|
plp626
银牌会员
     钻石会员
积分 2278
发帖 1020
注册 2007-11-19
状态 离线
|
『第 15 楼』:
使用 LLM 解释/回答一下
Originally posted by pusofalse at 2008-11-12 06:35 PM:
出题目的:了解批处理运行机制。
加分规则:
思路新颖8分
无临时文件3分
代码简洁3分
完美代码15分
题目内容:
让批处理自行判断是否被 ...
不知道是不是这个意思
http://bbs.bathome.cn/viewthread.php?tid=4725
Originally posted by pusofalse at 2008-11-12 06:35 PM:
The purpose of the question: To understand the operation mechanism of batch processing.
Bonus rules:
8 points for novel ideas
3 points for no temporary files
3 points for concise code
15 points for perfect code
Question content:
Let the batch processing determine by itself whether it is...
I don't know if this is the meaning
http://bbs.bathome.cn/viewthread.php?tid=4725
|

山外有山,人外有人;低调做人,努力做事。
进入网盘(各种工具)~~ 空间~~cmd学习 |
|
2009-10-12 18:35 |
|