![]() |
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-10-24 03:18 |
47,815 topics / 349,928 posts / today 1 new / 48,287 members |
| DOS批处理 & 脚本技术(批处理室) » Find Files and Operate (View Path, Copy, Delete).bat (9.5 Update) |
| Printable Version 8,370 / 23 |
| Floor16 vkill | Posted 2006-09-03 01:38 |
| 金牌会员 Posts 1,744 Credits 4,103 From 甘肃.临泽 | |
Originally posted by namejm at 2006-9-1 22:09:I don't understand. I created this folder just to know later which files I have searched, copied, and deleted. It has nothing to do with deletion. |
|
| Floor17 namejm | Posted 2006-09-03 13:21 |
| 荣誉版主 Posts 1,737 Credits 5,226 From 成都 | |
|
Because in your code, the for statement parses the text line by line. So, if you use the code in to filter records in the specified directory, how many lines are there in your %dati%_9.txt, the find %dati%_6.txt /v /i "%%a">>%dati%_5.txt statement will be executed that many times. You should change to another filtering solution to fundamentally solve the problem.
Just now during the testing process, it was found that in the option of not searching certain specific paths under the advanced search, you can only select y, but not n. Selecting n prompts that it is an invalid operation. This is because you did not make a jump when selecting n; after the selection is completed, a lot of temporary files have been generated before pressing any key to execute the next step. This belongs to the operation being too early, and it should start generating only after pressing any key; and after the search is completed, the path name in the success prompt is wrong; Today I will temporarily test here. I will test comprehensively another day - the code is getting more and more, and it looks a bit difficult, especially when encountering unclear expressions. Please pay attention to modifying the prompt language to make it both concise and accurate, and not let others have misunderstandings. |
|
| Floor18 vkill | Posted 2006-09-04 08:05 |
| 金牌会员 Posts 1,744 Credits 4,103 From 甘肃.临泽 | |
Originally posted by namejm at 2006-9-3 13:21: I'm also thinking of other methods to solve this, but I haven't thought of it yet |
|
| Floor19 namejm | Posted 2006-09-08 00:55 |
| 荣誉版主 Posts 1,737 Credits 5,226 From 成都 | |
Originally posted by he200377 at 2006-9-4 08:05: In fact, after changing the filtering scheme, a few lines of concise code can solve the problem. |
|
| Floor20 vkill | Posted 2006-09-08 04:45 |
| 金牌会员 Posts 1,744 Credits 4,103 From 甘肃.临泽 | |
Originally posted by namejm at 2006-9-8 00:55: Hehe, no matter how I change it, I find that the search speed during testing is not faster than the one built into Windows. I really don't know how Windows implements the search. |
|
| Floor21 namejm | Posted 2006-09-08 04:52 |
| 荣誉版主 Posts 1,737 Credits 5,226 From 成都 | |
|
That's because you used several for statements to read the content of the text. You know, the for statement parses the text as a whole. A large number of for operations will of course lead to low efficiency. Changing to a filtering solution can greatly improve the search efficiency.
|
|
| Floor22 vkill | Posted 2006-09-08 05:19 |
| 金牌会员 Posts 1,744 Credits 4,103 From 甘肃.临泽 | |
Originally posted by namejm at 2006-9-8 04:52: What about the win... What specific problem are you having? |
|
| Floor23 andred0421 | Posted 2006-11-23 15:23 |
| 初级用户 Posts 47 Credits 114 | |
|
Learning
|
|
| Floor24 ccwan | Posted 2006-11-23 21:38 |
| 金牌会员 Posts 1,160 Credits 2,725 From 河北廊坊 | |
|
I was too busy yesterday and didn't realize there were so many good posts.
|
|
| Prev 1 2 |
|
[ Contact the Union admin team -
中国DOS联盟 -
Standard version ] Sponsored by ifanr Inc | © 2001–2023 |