|
lxmxn
版主
       
积分 11386
发帖 4938
注册 2006-7-23
状态 离线
|
『第 16 楼』:
使用 LLM 解释/回答一下
Re:3742668
呵呵,真的建立了这个文件夹,我看见了出错的提示,还以为没有建立这个文件夹呢``
“ 2>nul”这招可真够绝的哦``不管系统报什么错,强制执行建立目录命令,呵呵````
Re:3742668
Hehe, I really created this folder. I saw the error message and thought I didn't create this folder``
The trick of "2>nul" is really brilliant oh`` No matter what error the system reports, it enforces the command to create the directory, hehe````
|
|
2006-10-12 07:35 |
|
|
weilong888
银牌会员
    
积分 1270
发帖 548
注册 2004-5-31
状态 离线
|
『第 17 楼』:
使用 LLM 解释/回答一下
加上2>nul就不会有出错提示信息了。
Adding 2>nul will prevent error messages from appearing.
|
|
2006-10-12 07:39 |
|
|
Dana
初级用户
  潜水&&搜索
积分 70
发帖 28
注册 2007-4-22
状态 离线
|
『第 18 楼』:
使用 LLM 解释/回答一下
学习了,以前我也遇到过,是改注册表和提取字符实现的...
Learned, I also encountered this before, which was achieved by modifying the registry and extracting characters...
|
|
2007-4-22 15:33 |
|
|
546474
中级用户
  
积分 247
发帖 123
注册 2007-4-17
状态 离线
|
|
2007-4-22 22:51 |
|
|
HAT
版主
       
积分 9023
发帖 5017
注册 2007-5-31
状态 离线
|
『第 20 楼』:
使用 LLM 解释/回答一下
For /F "tokens=1" %%a in ('date/t') do md %%a
md %date%*
md *%date%
XP下测试失败
即使加上引号也不能正确创建
C:\>echo %date%
06/18/2007 Mon
```
For /F "tokens=1" %%a in ('date/t') do md %%a
```
```
md %date%*
```
```
md *%date%
```
Test failed under XP
Even adding quotes can't create correctly
C:\>echo %date%
06/18/2007 Mon
|
|
2007-6-18 17:03 |
|
|
joshualaw
初级用户
 
积分 132
发帖 62
注册 2007-6-5
状态 离线
|
『第 21 楼』:
使用 LLM 解释/回答一下
Originally posted by HAT at 2007-6-18 05:03 PM:
For /F "tokens=1" %%a in ('date/t') do md %%a
md %date%*
md *%date%
XP下测试失败
即使加上引号也不能正确创建
For /F "tokens=1" %%a in ('date/t') do md %%a
%date:~0,4%%date:~5,2%%date:~8,2%
%date:~4,4%%date:~9,2%%date:~12,2%
这些语句只能用在XP上,能否告知用那同一语句都能用在XP 和 WIN2K 上,请各位高手出招
Last edited by joshualaw on 2007-6-19 at 01:12 PM ]
Originally posted by HAT at 2007-6-18 05:03 PM:
For /F "tokens=1" %%a in ('date/t') do md %%a
md %date%*
md *%date%
Failed testing under XP
Even with quotes, it cannot be created correctly
For /F "tokens=1" %%a in ('date/t') do md %%a
%date:~0,4%%date:~5,2%%date:~8,2%
%date:~4,4%%date:~9,2%%date:~12,2%
These statements can only be used on XP. Can you tell me how to use the same statement to work on both XP and WIN2K? Please, all the experts come up with a solution
Last edited by joshualaw on 2007-6-19 at 01:12 PM ]
|
|
2007-6-19 13:06 |
|
|
zasxcdfv
初级用户
 
积分 152
发帖 75
注册 2007-2-6
状态 离线
|
『第 22 楼』:
使用 LLM 解释/回答一下
Originally posted by joshualaw at 2007-6-19 01:06 PM:
Originally posted by HAT at 2007-6-18 05:03 PM:
For /F "tokens=1" %%a in ('date/t') do md %%a
md %date%*
md *%date%
XP ...
可以先用findstr ver判断操作系统吧。
刚好上午我也遇到了win2000和xp下date 格式不同的问题。烦人啊。
Originally posted by joshualaw at 2007-6-19 01:06 PM:
Originally posted by HAT at 2007-6-18 05:03 PM:
For /F "tokens=1" %%a in ('date/t') do md %%a
md %date%*
md *%date%
XP ...
You can first use findstr ver to determine the operating system.
I just encountered the problem of different date formats under win2000 and xp in the morning. Annoying ah.
|
|
2007-6-19 13:26 |
|
|
HAT
版主
       
积分 9023
发帖 5017
注册 2007-5-31
状态 离线
|
『第 23 楼』:
使用 LLM 解释/回答一下
C:\>echo %date%
06/19/2007 Tue
21楼的帅哥请先看看我的日期显示格式
For /F "tokens=1" %%a in ('date/t') do md %%a
%date:~0,4%%date:~5,2%%date:~8,2%
%date:~4,4%%date:~9,2%%date:~12,2%
这三条语句即使在XP下也不通用
因为日期的显示格式可能不同
C:\>echo %date%
06/19/2007 Tue
The handsome guy on floor 21, please first take a look at my date display format
For /F "tokens=1" %%a in ('date/t') do md %%a
%date:~0,4%%date:~5,2%%date:~8,2%
%date:~4,4%%date:~9,2%%date:~12,2%
These three statements are not universal even under XP
Because the date display format may be different
|
|
2007-6-19 13:43 |
|
|
zasxcdfv
初级用户
 
积分 152
发帖 75
注册 2007-2-6
状态 离线
|
『第 24 楼』:
使用 LLM 解释/回答一下
Originally posted by HAT at 2007-6-19 01:43 PM:
21楼的帅哥请先看看我的日期显示格式
For /F "tokens=1" %%a in ('date/t') do md %%a
%date:~0,4%%date:~5,2%%date:~8,2%
%date:~4,4%%date:~9,2%%date:~12,2%
这三条语句 ...
能通过某些细节判断格式么?比如操作系统版本号?
这个问题不大但很烦,程序拿出来可用性不强。
ver >111.txt
echo %date%>>111.txt
start 111.txt
Microsoft Windows XP
2007-06-19 星期二
看来没戏:( 难道只能在控制面板里改的吗。。。
Last edited by zasxcdfv on 2007-6-19 at 02:11 PM ]
Originally posted by HAT at 2007-6-19 01:43 PM:
Handsome guy on floor 21, please first take a look at my date display format
For /F "tokens=1" %%a in ('date/t') do md %%a
%date:~0,4%%date:~5,2%%date:~8,2%
%date:~4,4%%date:~9,2%%date:~12,2%
These three statements...
Can you judge the format through some details? For example, the operating system version number?
This problem is not a big deal but very annoying. The program is not very usable when taken out.
ver >111.txt
echo %date%>>111.txt
start 111.txt
Microsoft Windows XP
Tuesday, June 19, 2007
It seems there's no way :( Could it only be changed in the Control Panel...
Last edited by zasxcdfv on 2007-6-19 at 02:11 PM ]
|
|
2007-6-19 13:47 |
|
|
HAT
版主
       
积分 9023
发帖 5017
注册 2007-5-31
状态 离线
|
『第 25 楼』:
使用 LLM 解释/回答一下
//能通过某些细节判断格式么?比如操作系统版本号?
系统版本号好像不能区分:'(
C:\>ver
Microsoft Windows XP
C:\>echo %date%
06/19/2007 Tue
//Can you judge the format through some details? Such as the operating system version number?
It seems that the system version number cannot be distinguished. ': (
C:\>ver
Microsoft Windows XP
C:\>echo %date%
06/19/2007 Tue
|
|
2007-6-19 14:02 |
|
|
zasxcdfv
初级用户
 
积分 152
发帖 75
注册 2007-2-6
状态 离线
|
『第 26 楼』:
使用 LLM 解释/回答一下
精通注册表的朋友可以看一下HKEY_CURRENT_USER/Control Panel/International
里面的几个建值,应该对这个问题有所帮助
sShortDate就是date的格式
Friends proficient in the registry can take a look at the key values in HKEY_CURRENT_USER/Control Panel/International. These should be helpful for this issue. sShortDate is the format of the date
|
|
2007-6-19 14:20 |
|
|
mgchl
初级用户
 
积分 24
发帖 10
注册 2007-11-1
状态 离线
|
『第 27 楼』:
日期格式是 2008-09-09 星期二
使用 LLM 解释/回答一下
set d=%date%
set a=%d:~0,10%
echo %a:-=%
运算结果就是
H:\>set d=2008-09-09 星期二
H:\>set a=2008-09-09
H:\>echo 20080909
20080909
set d=%date%
set a=%d:~0,10%
echo %a:-=%
The operation result is
H:\>set d=2008-09-09 星期二
H:\>set a=2008-09-09
H:\>echo 20080909
20080909
|
|
2008-9-9 23:00 |
|
|
mgchl
初级用户
 
积分 24
发帖 10
注册 2007-11-1
状态 离线
|
『第 28 楼』:
日期格式是 2008-09-09 星期二
使用 LLM 解释/回答一下
set d=%date%
set a=%d:~0,10%
echo %a:-=%
运算结果就是
H:\>set d=2008-09-09 星期二
H:\>set a=2008-09-09
H:\>echo 20080909
20080909
set d=%date%
set a=%d:~0,10%
echo %a:-=%
The operation result is
H:\>set d=2008-09-09 星期二
H:\>set a=2008-09-09
H:\>echo 20080909
20080909
|
|
2008-9-9 23:01 |
|