任何人都可以在Windows中共享重复文件查找器的源代码吗? [英] Can any one share the source code of duplicate file finder in windows?

查看:73
本文介绍了任何人都可以在Windows中共享重复文件查找器的源代码吗?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

如何在Windows中查找重复的文件/文件夹?任何人共享可用的源代码都可以使用任何语言(首选项将是C,C ++,Java,python或C#),这可以让我们一睹如何在那里实现文件处理和其他概念,并为重复构建我自己的代码文件查找器。



我尝试了什么:



我必须实现文件处理概念或任何其他与文件结构相关的概念,并且必须在windows中为重复的文件查找器编写代码...我尝试使用C ++语言这样做但是我没有得到如何继续?...我是能够编写一个代码来检测重复的数字/字符,但是如何在windows中搜索文件实现相同的功能。没有得到任何广泛的想法..需要看到一些现有的代码,以便我可以了解流程是如何进行的,也可以理解相同的工作...

How to find duplicate file/folder in windows? Can any one share the available source code can be in any language(preference will be C,C++,Java,python or C#) which can give a glimpse of how to implement the file handling and other concept there and build my own code for duplicate file finder.

What I have tried:

I have to implement the file handling concept or any other related to the file structure and have to write a code for duplicate file finder in windows...I tried doing that using C++ language but am not getting how i should go ahead?...i am able to write a code for detecting duplicate number/character but how the same can be implemented for the searching files in windows..?? Not getting any broad idea..Need to see some existing code so that i can get the idea how the flow is going and also can understand the working of the same...

推荐答案

抱歉,此网站不提供订购代码。查找重复文件夹与查找任何重复文件夹相同。您可以构建所有项目的列表,并在构建列表时检查重复项,或者在按顺序对它们进行排序后再检查。请参阅 FindFirstFile功能(Windows) [ ^ ]开始。
Sorry, this site does not provide code to order. Finding duplicate folders is just the same as finding duplicates of anything. You build a list of all the items and check for duplicates as you build the list, or at the end after sorting them in order. See FindFirstFile function (Windows)[^] to get started.


要详细说明Richard编写的内容,请使用FindFirstFile和FindNextFile遍历目录结构并使用您运行的每个文件加载容器。容器应该是一个支持快速搜索的容器,因为你会发现很多文件。您需要保存找到的每个文件的目录路径和文件名,因为您要搜索文件名但是您还需要路径,因为在不知道文件名的位置的情况下,文件名很少使用。



FindNextFile将返回目录和文件。如果找不到,则需要搜索文件并将其添加到列表中。这些目录也需要遍历,所以这可能是一个递归函数。
To elaborate on what Richard wrote, use FindFirstFile and FindNextFile to traverse a directory structure and load a container with each file you run across. The container should be one that supports very fast searching because you will find a LOT of files. You will want to save the directory path and the file name for each file found because you want to search for the file name but you need the path also because just the file name is of little use without knowing where it is.

FindNextFile will return both directories and files. The files need to be searched for and added to the list if not found. The directories need to be traversed also so this could be a recursive function.


这篇关于任何人都可以在Windows中共享重复文件查找器的源代码吗?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆