|
quan_zhou
初级用户
 
积分 190
发帖 40
注册 2005-3-17
状态 离线
|
『第 16 楼』:
老是麻烦大家,真不好意思,STRINGS哪用下载?
使用 LLM 解释/回答一下
Compfile DOS能正常使用。非常感谢!
请问大家能否提供Strings/Varset哪能下载, 我找了几天都下载不了。
Compfile DOS works normally. Thanks a lot!
Could everyone please provide where to download Strings/Varset? I've been looking for a few days but can't download it.
|
|
2005-3-22 00:00 |
|
|
Climbing
铂金会员
       网络独行侠
积分 6962
发帖 2753
注册 2003-4-16 来自 河北保定
状态 离线
|
|
2005-3-22 00:00 |
|
|
32211001
初级用户
 
积分 141
发帖 11
注册 2004-9-30
状态 离线
|
『第 18 楼』:
使用 LLM 解释/回答一下
我常用的命令行工具请在这里下载:Climbing常用的DOS命令行工具压缩安装包(11M左右) 先谢谢climbing,再问一下:好人做到底吧,请问climing是不是大概写个注释出来啊?要不怎么用啊?
The commonly used command-line tools I use are downloaded here: Climbing's commonly used DOS command-line tools compressed installation package (about 11M) First, thank you to climbing, and then I ask: Be a good person to the end, may I ask if climbing can roughly write some comments out? Otherwise, how to use it?
|
|
2005-3-22 00:00 |
|
|
Climbing
铂金会员
       网络独行侠
积分 6962
发帖 2753
注册 2003-4-16 来自 河北保定
状态 离线
|
『第 19 楼』:
使用 LLM 解释/回答一下
没法满足你这种要求(这几乎可以算是无理要求),我的安装包中大概有几百个程序,我不可能一一为这些程序写说明作注释,大部分程序你可以通过运行加/?参数(或者-h, --help)来获得帮助,不明白的你就不要用,还有很多程序的说明文档就在其所在目录下的同名txt文件中。请楼上搞清楚,别人没有义务去手把手教你做什么,很多时候学东西是要靠自己的努力的。
I can't meet such a requirement (this can almost be regarded as an unreasonable request). There are probably hundreds of programs in my installation package. I can't write instructions and comments for these programs one by one. Most of the programs you can get help by running with the /? parameter (or -h, --help). If you don't understand, don't use them. There are also many program instruction documents in the same - name txt file in their respective directories. Please figure it out upstairs. Others don't have the obligation to teach you what to do one - to - one. Many times, learning things depends on your own efforts.
|

偶只喜欢回答那些标题和描述都很清晰的帖子!
如想解决问题,请认真学习“这个帖子”和“这个帖子”并努力遵守,如果可能,请告诉更多的人!
|
|
2005-3-23 00:00 |
|
|
quan_zhou
初级用户
 
积分 190
发帖 40
注册 2005-3-17
状态 离线
|
『第 20 楼』:
使用 LLM 解释/回答一下
我把Chehui530的代码改了一下,功能基本上实现了,但总是觉得不是很完善。
如果我的那引些txt、bat的文件名不是数字的,而是随机的英文字母,请问各位前辈那
又要怎么写?
我的内容如下:
TEST.bat
------------------------
@echo off
:start
string a=add %b%,1
compfile d:\mods.log %a%.log /v /a /s
if errorlevel 128 goto bat
if errorlevel 64 goto reture
:reture
string b=add %b%,1
goto start
if %b%==101 goto end
:bat
call %a%.bat
:end
I changed Chehui530's code a bit, and the function is basically realized, but I always feel it's not perfect.
If my those txt, bat file names are not numbers but random English letters, how should I write it then?
My content is as follows:
TEST.bat
------------------------
@echo off
:start
string a=add %b%,1
compfile d:\mods.log %a%.log /v /a /s
if errorlevel 128 goto bat
if errorlevel 64 goto reture
:reture
string b=add %b%,1
goto start
if %b%==101 goto end
:bat
call %a%.bat
:end
|
|
2005-3-23 00:00 |
|
|
chenhui530
高级用户
   
积分 772
发帖 273
注册 2004-10-23
状态 离线
|
『第 21 楼』:
使用 LLM 解释/回答一下
要是是随即数很难
If it's random numbers, it's difficult
|

http://www.msfans.net/bbs/ |
|
2005-3-23 00:00 |
|
|
willsort
元老会员
         Batchinger
积分 4432
发帖 1512
注册 2002-10-18
状态 离线
|
『第 22 楼』:
使用 LLM 解释/回答一下
Re chenhui530: 这不是随机数的问题,而是文件遍历的问题,也就是说,楼主想实现与任意名字的log文件比较,这用for就足够了。如果操作比较复杂,可以在for内Call它的字程序即可。 至于比较,FC完全可以用,用FIND查找FC的输出是否包含文件不存在相异的字串即可,你不是已经这样用了吗? 所以说,这个程序目前可以不需要第三方程序辅助,就可以满足楼主的要求了。
Re chenhui530: This is not an issue of random numbers, but an issue of file traversal. That is to say, the owner wants to implement comparison with log files of any names, which can be fully achieved with for. If the operation is relatively complex, you can Call its subroutine within for. As for comparison, FC can be fully used. Use FIND to find whether the output of FC contains the string of file non - existence difference. Haven't you already used it like this? So, this program can currently meet the owner's requirements without the assistance of third - party programs.
|

※ Batchinger 致 Bat Fans:请访问 批处理编程的异类 ,欢迎交流与共享批处理编程心得! |
|
2005-3-24 00:00 |
|
|
chenhui530
高级用户
   
积分 772
发帖 273
注册 2004-10-23
状态 离线
|
『第 23 楼』:
使用 LLM 解释/回答一下
to willsortwillsort兄好像不使用第三方工具不能完成哦!也许是我知识有限吧!请willsort兄公布出完美的程序给大家学习
It seems that brother willsortwillsort can't complete it without using third-party tools! Maybe I'm limited in knowledge! Please brother willsortwillsort publish a perfect program for everyone to learn
|

http://www.msfans.net/bbs/ |
|
2005-3-24 00:00 |
|
|
Climbing
铂金会员
       网络独行侠
积分 6962
发帖 2753
注册 2003-4-16 来自 河北保定
状态 离线
|
『第 24 楼』:
使用 LLM 解释/回答一下
willsort这回是犯错误了,DOS 7.1下的fc是根本没有这种功能的。
willsort made a mistake this time. The fc in DOS 7.1 simply doesn't have such a function.
|

偶只喜欢回答那些标题和描述都很清晰的帖子!
如想解决问题,请认真学习“这个帖子”和“这个帖子”并努力遵守,如果可能,请告诉更多的人!
|
|
2005-3-24 00:00 |
|
|
willsort
元老会员
         Batchinger
积分 4432
发帖 1512
注册 2002-10-18
状态 离线
|
『第 25 楼』:
使用 LLM 解释/回答一下
Re chenhui530:
想差了一点,关键的问题在于获得文件的主文件名,这一点for很难完成,所以改用文件遍历循环。
关于文件遍历,如果你仔细看过我曾发过的关于文件遍历的帖子的话,便会明白这个程序只是那些程序的一个变形而已。他们都利用了一类从文本文件根据行、列/单词的地址获取的单词串的算法,即利用debug 生成一个不含回车的命令行前缀,然后链入文本中进行处理。利用此类方法,也可以获取文件的扩展名、完整路径、所在目录、文件大小、日期时间、文件属性等信息,甚至也可以获得我们在XP下很难获得的相对路径,但是算法的复杂度和效率都降低了其实用性。这样,你能更加体会到我的无奈了吧。
Re quan_zhou:
程序要求在命令行执行,因为你的设计需求不明确,所以使用了命令行参数确定比较文件。比如:
cmprcall c:\x.txt d:\ log
这就是将c:\x.txt与d:\下的所有.log文件比较了。
对于你的设计初衷有些建议,关于目标匹配与执行,我建议使用单独的批处理程序,而不是根据匹配调用多个批处理,这样可以节约硬盘空间开销,同时一定程度上可以简化程序,当然如果你有特别的需要必须如此实现,那么例外。另外,那个test.bat也有些问题,比如if %b%==101 goto end永不被执行,变量%b%每次递增2等等。
Re climbing:
DOS/Win9x的FC确实不返回errorlevel,但是FIND返回,所以可以用FIND鉴定FC的比对结果。我早期的文件遍历程序便曾如此用过,
chenhui530兄也曾如此用在了NT环境下的程序中,当然,那是不必要的。不知你是否另有所指?
:: CmprCall.bat - 将一文件与一组文件比较,执行对应的批处理
:: Will Sort - 11:54 2005-3-24
:: 程序稍作修改,可以改为其他名字使用了
@echo off
if "%1"=="$" goto %2
if "%3"=="" goto end
set src=%1
:MakeList
dir %2.\*.%3 | find /i " %3 ">~visit.lst
:MakePreLine
echo %0 $ Compare > ~visit.pre
for %%c in (rcx 17 w q) do echo %%c>> ~visit.asd
debug ~visit.pre < ~visit.asd > nul
rem if == chcp 936 > nul
:LoopVisit
copy /a ~visit.pre+~visit.lst ~visit.bat > nul
call ~visit.bat
if not "%matched%"=="" goto Clear
find "%0 $ Compare " /v < ~visit.bat > ~visit.lst
goto LoopVisit
:Compare
if "%3"=="" set matched=!failed!
if "%3"=="" goto end
if not exist d:\%3.bat goto end
fc %src% d:\%3.%4 | find "FC: no differences encountered">nul
if not errorlevel 1 call %3.bat
if not errorlevel 1 set matched=!success!
goto end
:Clear
del ~visit.*
set matched=
set src=
:End
Re chenhui530:
A bit off. The key issue is obtaining the main filename of the file. This is difficult to do with for, so a file traversal loop is used instead.
Regarding file traversal, if you've carefully read my previous post about file traversal, you'll understand that this program is just a variation of those programs. They all utilize an algorithm for obtaining a string of words from a text file based on the address of lines, columns/words, that is, using debug to generate a command line prefix without carriage returns and then chaining it into the text for processing. Using this method, you can also obtain the file extension, full path, directory it's in, file size, date and time, file attributes, etc. Even the relative path that's hard to obtain under XP can be gotten, but the complexity and efficiency of the algorithm reduce its practicality. Thus, you can better understand my helplessness.
Re quan_zhou:
The program requires execution in the command line. Since your design requirements are not clear, command line parameters are used to determine the files to compare. For example:
cmprcall c:\x.txt d:\ log
This is comparing c:\x.txt with all .log files under d:\.
Some suggestions regarding your design intention: For target matching and execution, I suggest using a separate batch program instead of calling multiple batches based on matching. This can save hard disk space overhead and simplify the program to some extent. Of course, there are exceptions if you have special needs that must be implemented this way. Also, there are some issues with that test.bat, such as if %b%==101 goto end is never executed, and the variable %b% increments by 2 each time, etc.
Re climbing:
The FC in DOS/Win9x does not return errorlevel, but FIND does, so FIND can be used to identify the comparison result of FC. My early file traversal program used this, and Brother chenhui530 also used it in the program under NT environment, of course, that was unnecessary. I wonder if you have something else in mind?
:: CmprCall.bat - Compare one file with a group of files and execute the corresponding batch
:: Will Sort - 11:54 2005-3-24
:: The program has been slightly modified and can be used with other names
@echo off
if "%1"=="$" goto %2
if "%3"=="" goto end
set src=%1
:MakeList
dir %2.\*.%3 | find /i " %3 " >~visit.lst
:MakePreLine
echo %0 $ Compare > ~visit.pre
for %%c in (rcx 17 w q) do echo %%c>> ~visit.asd
debug ~visit.pre < ~visit.asd > nul
rem if == chcp 936 > nul
:LoopVisit
copy /a ~visit.pre+~visit.lst ~visit.bat > nul
call ~visit.bat
if not "%matched%"=="" goto Clear
find "%0 $ Compare " /v < ~visit.bat > ~visit.lst
goto LoopVisit
:Compare
if "%3"=="" set matched=!failed!
if "%3"=="" goto end
if not exist d:\%3.bat goto end
fc %src% d:\%3.%4 | find "FC: no differences encountered" >nul
if not errorlevel 1 call %3.bat
if not errorlevel 1 set matched=!success!
goto end
:Clear
del ~visit.*
set matched=
set src=
:End
|

※ Batchinger 致 Bat Fans:请访问 批处理编程的异类 ,欢迎交流与共享批处理编程心得! |
|
2005-3-24 00:00 |
|
|
chenhui530
高级用户
   
积分 772
发帖 273
注册 2004-10-23
状态 离线
|
『第 26 楼』:
使用 LLM 解释/回答一下
to willsort我不会使用debug对你的这个程序也是真的看得不太懂!willsort兄能作解释下吗?
To willsort, I don't know how to use DEBUG and really don't understand your program! Brother willsort, can you explain it?
|

http://www.msfans.net/bbs/ |
|
2005-3-24 00:00 |
|
|
Climbing
铂金会员
       网络独行侠
积分 6962
发帖 2753
注册 2003-4-16 来自 河北保定
状态 离线
|
『第 27 楼』:
使用 LLM 解释/回答一下
Re willsort:是的,是我错了,我没有发现DOS7.1下的fc比较相同的文件后会返回那个“文件没有相异处(英文)”的字符串,我以为不会有任何返回值呢。要不怎么说Willsort是高手呢,佩服的五体投地!
Re willsort: Yes, I was wrong. I didn't notice that under DOS 7.1, fc will return the string "The files are identical (in English)" after comparing the same files. I thought there would be no return value. No wonder Willsort is a master! I'm really in awe!
|

偶只喜欢回答那些标题和描述都很清晰的帖子!
如想解决问题,请认真学习“这个帖子”和“这个帖子”并努力遵守,如果可能,请告诉更多的人!
|
|
2005-3-24 00:00 |
|
|
willsort
元老会员
         Batchinger
积分 4432
发帖 1512
注册 2002-10-18
状态 离线
|
|
2005-3-25 00:00 |
|
|
quan_zhou
初级用户
 
积分 190
发帖 40
注册 2005-3-17
状态 离线
|
『第 29 楼』:
使用 LLM 解释/回答一下
非常感谢大家的帮助!
我现在正在消化WillSort兄的这批处理, 有太多的地方不明白我先去查资料, 因为我太菜了。
实在消化不了的时候再向大家请教。 谢谢大家!
Thank you very much for everyone's help!
I am currently digesting Brother WillSort's batch processing. There are too many places I don't understand. I'll first go to check the information because I'm too novice.
I'll ask everyone for help when I really can't digest it. Thank you all!
|
|
2005-3-25 00:00 |
|