In addition to Weibo, there is also WeChat
Please pay attention
WeChat public account
Shulou
2025-01-18 Update From: SLTechnology News&Howtos shulou NAV: SLTechnology News&Howtos > Network Security >
Share
Shulou(Shulou.com)06/01 Report--
Delete duplicate file function
How to use it:
Create a BAT file, such as 1.bat, which reads: RemoveDuplicate.exe path2 path3 (or enter the above at the command line)
Where path2 represents the original folder and path3 represents the folder to be detected and deleted
For example, the folder path2 contains: 1.txt, 2.txt, 3.txt, 4.txt, 5.txt
For example, the folder path3 contains: 4.txt, 5.txt, 6.txt, 7.txt, 8.txt
(4.txt and 5.txt in path2 and path3 are files of the same name and size)
Execute RemoveDuplicate.exe path2 path3
After that:
In the folder path2 are: 1.txt, 2.txt, 3.txt, 4.txt, 5.txt
In the folder path3 are: 6.txt, 7.txt, 8.txt
The 4.txt and 5.txt in the folder path3 will be deleted.
The purpose of writing this method is:
I have two development machines and one home machine. Usually a lot of source code and design files are transferred to and from each machine, and many copies are copied. Recently, I found that one of the development machines has full capacity. I want to do a repetitive processing of all the source code and design documents on the two development machines and home machines (both development machines have monitoring services similar to those of web worms. Will monitor and download many resources on the network), keep only one set, such as development machine A, development machine B, home machine C, based on "development machine A". To delete duplicate source code and various documents on "development machine B" and "home machine C".
You can put this program into "development machine A" and execute RemoveDuplicate.exe pathA under the console, where pathA represents the basic path (with reference to the source code and various documents). After execution, an all.conf file is generated, which records the information (name, path, size) of all files under the pathA path of "development machine A".
For example, put RemoveDuplicate.exe under the D letter of "developer A"
The console enters the command cd\ d d:\ to switch to the D drive letter
Enter RemoveDuplicate.exe d:\ or RemoveDuplicate.exe "d:\" in the console
An all.conf file will be generated under disk D.
Then put the program RemoveDuplicate.exe and all.conf files into "developer B" and execute RemoveDuplicate.exe "an exists directory" pathB under the console, where "an exists directory" represents a non-existent file path, which can be directly written as "" (empty string do not omit quotation marks), or as a non-existent path such as aaaaaaaaa, and pathB represents the folder path that "Development Machine B" needs to be checked and deleted.
For example, put RemoveDuplicate.exe under the D letter of "developer B"
The console enters the command cd\ d d:\ to switch to the D drive letter
Console enter RemoveDuplicate.exe "" d:\ e:\ or RemoveDuplicate.exe "d:\"e:\"
The same files in the d:\ and e:\ paths on "developer B" as in all.conf will be deleted.
Then the console enters RemoveDuplicate.exe d:\ to count all files under the D drive of "developer B" into all.conf.
Then enter RemoveDuplicate.exe e:\ in the console to count all files under the E drive of "developer B" into all.conf.
Then put the RemoveDuplicate.exe and all.conf files of this program into "Home computer C" and execute RemoveDuplicate.exe "an exists directory" pathC under the console (the rest as above)
For example, put RemoveDuplicate.exe under the D letter of "Home computer C"
The console enters the command cd\ d d:\ to switch to the D drive letter
Console enter RemoveDuplicate.exe "" e:\ or RemoveDuplicate.exe "e:\"
The same file under the e:\ path on "home machine C" as in all.conf will be deleted.
Welcome to subscribe "Shulou Technology Information " to get latest news, interesting things and hot topics in the IT industry, and controls the hottest and latest Internet news, technology news and IT industry trends.
Views: 0
*The comments in the above article only represent the author's personal views and do not represent the views and positions of this website. If you have more insights, please feel free to contribute and share.
Continue with the installation of the previous hadoop.First, install zookooper1. Decompress zookoope
"Every 5-10 years, there's a rare product, a really special, very unusual product that's the most un
© 2024 shulou.com SLNews company. All rights reserved.