![]() |
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 07:44 |
47,815 topics / 349,928 posts / today 1 new / 48,287 members |
| DOS批处理 & 脚本技术(批处理室) » (Closed) A question about deleting files with the same size and type! |
| Printable Version 4,475 / 25 |
| Floor16 WinXYhappy | Posted 2006-10-27 02:56 |
| 初级用户 Posts 14 Credits 30 | |
Originally posted by he200377 at 2006-10-27 01:15 AM: No, no, that's too complicated. Actually, it's like this: There are many identical (same content) files in this folder. Just when naming the files, so there will be *1*.txt, *2*.txt, etc. Actually, just keep *1* and discard the others. And temp1.txt and tmp1.txt are different (file size). Only temp1.txt and temp2.txt are the same. That would be simpler, right????? Thanks! |
|
| Floor17 WinXYhappy | Posted 2006-10-27 03:01 |
| 初级用户 Posts 14 Credits 30 | |
Originally posted by electronixtar at 2006-10-27 02:52 AM: Ah, ah, ah, there's another thing. I'll go find it. But still hope to help me solve this problem. Thank you,大虾electronixtar for your great guidance. |
|
| Floor18 不得不爱 | Posted 2006-10-27 03:24 |
| 超级版主 Posts 2,044 Credits 5,310 From 四川南充 | |
|
@ECHO OFF
SETLOCAL ENABLEDELAYEDEXPANSION for /f "tokens=*" %%a in ('dir/a-d/b/oe') do set/a c+=1&set a!c!=%%a&set b!c!=%%~za&set c!c!=%%~xa for /l %%a in (1,1,%c%) do set/a d=%%a+1&for /l %%b in (!d!,1,%c%) do if not !b%%a!.==. call :1 %%a %%b goto :eof :1 if !b%1!==!b%2! if !c%1!==!c%2! set b%2=&del "!a%2!" goto :eof |
|
| Floor19 不得不爱 | Posted 2006-10-27 03:28 |
| 超级版主 Posts 2,044 Credits 5,310 From 四川南充 | |
|
After repeated trials, the above code should be able to solve the problem of the original poster. But is this thread posted in the wrong place?
|
|
| Floor20 WinXYhappy | Posted 2006-10-27 03:52 |
| 初级用户 Posts 14 Credits 30 | |
Originally posted by qwe1234567 at 2006-10-27 03:24 AM: Hahaha, thanks to the perfect codes from moderator qwe1234567. It was completely successful!!! Here, I also want to thank electronixtar. My expression ability made him spend a lot of brain cells. But I also learned a lot of .bat knowledge. I will continue to ask electronixtar, the expert, in the future, but it will waste a lot of electronixtar's brain cells again -_-。^_^ I also want to thank he200377,大虾 lxmxn and others for their attention, otherwise my post would have sunk to the bottom of the sea!!! !!!!! These words are so familiar!!! It seems like lines from *****TV. ^_^ Thanks to everyone. What the moderator qwe1234567 said is right. I carefully went out to check the house number. . . Depressed, I entered the wrong door! But I'll just settle here even if it's a wrong entry. Moreover, I still have some不懂的 places in the above code to ask. |
|
| Floor21 不得不爱 | Posted 2006-10-27 03:56 |
| 超级版主 Posts 2,044 Credits 5,310 From 四川南充 | |
|
I'll still transfer it to {DOS Batch & Script Technology (Batch Processing Room)}.
|
|
| Floor22 WinXYhappy | Posted 2006-10-27 04:03 |
| 初级用户 Posts 14 Credits 30 | |
Originally posted by qwe1234567 at 2006-10-27 03:56 AM: Moderator qwe1234567, what can I say about you!! You're just a good person. ^_^ |
|
| Floor23 vkill | Posted 2006-10-27 04:12 |
| 金牌会员 Posts 1,744 Credits 4,103 From 甘肃.临泽 | |
|
The title of the article is seriously wrong. How can it be said to be duplicate files??? It leads us to an erroneous understanding
|
|
| Floor24 WinXYhappy | Posted 2006-10-27 04:20 |
| 初级用户 Posts 14 Credits 30 | |
Originally posted by he200377 at 2006-10-27 04:12 AM: ^_^, sorry, I just said I am not good at Chinese. Otherwise,大虾electronixtar wouldn't have wasted so many brain cells. Hahaha. I also hope that there are experts who can add QQ or MSN and so on. In this way, if I don't understand, I can also explain slowly. But.... I have tried many times and no one adds me. 5555555555555555555~~~~~. I have to ask repeatedly patiently, and I also hope that all the experts can understand! |
|
| Floor25 不得不爱 | Posted 2006-10-27 04:39 |
| 超级版主 Posts 2,044 Credits 5,310 From 四川南充 | |
|
Because the title does not match the content, please the poster modify the title to: (Closed) A question about deleting files with the same size and type! Otherwise, the poster may lose points! The method is to click "Edit" under the topic to edit!
|
|
| Floor26 WinXYhappy | Posted 2006-10-27 05:23 |
| 初级用户 Posts 14 Credits 30 | |
Originally posted by qwe1234567 at 2006-10-27 04:39 AM: Received, will fix it immediately! Haha |
|
| Prev 1 2 |
|
[ Contact the Union admin team -
中国DOS联盟 -
Standard version ] Sponsored by ifanr Inc | © 2001–2023 |