Duplicated Files in Folder and Subfolder
-
Tuesday, February 05, 2013 11:59 AM
Hi All,
I'm looking for a script that;
-run on folders and subfolders collecting all duplicated files and put all in a .txt file output
-after that, another script that read this .txt files and move all those files to an external harddrive.
I know there is programs for that, but I dont wanna to install nothing.
Thanks
Thiago Pereira | www.winsec.org
All Replies
-
Tuesday, February 05, 2013 12:08 PM
There are lots of tools like this. You can find them using a search engine. If you do not want to install any of them then you have to write some suitable script yourself. It is unlikely that a respondent in this forum will do the job for you.- Marked As Answer by Bill_StewartMicrosoft Community Contributor, Moderator Tuesday, February 05, 2013 8:15 PM
-
Tuesday, February 05, 2013 3:58 PM
As I already said before, I know the tools/programs, but I dont want to install nothing.
I'm not asking to anyone do my job, I come to foruns asking for Tips and help to create a good script.
One more thing, answers like yours just case spam on posts, if you cant help someone, ignore and go to another thread.
Thanks.
Thiago Pereira | www.winsec.org
-
Tuesday, February 05, 2013 4:02 PMModeratorBy "duplicate", do you mean identical file names, or identical content?
[string](0..33|%{[char][int](46+("686552495351636652556262185355647068516270555358646562655775 0645570").substring(($_*2),2))})-replace " "
-
Tuesday, February 05, 2013 4:24 PM
As I already said before, I know the tools/programs, but I dont want to install nothing.
I'm not asking to anyone do my job, I come to foruns asking for Tips and help to create a good script.
One more thing, answers like yours just case spam on posts, if you cant help someone, ignore and go to another thread.
Thiago Pereira | www.winsec.org
If you know how to find tools and how to program then the usual first steps would be to
- check the script repository for suitable code
- state the language you prefer to use (batch/VBScript/PowerShell)
- post the code you have written so far, then ask for further advice.
I was unable to find any of the above in your initial post. Note also mjolinor's question: Does "duplicated" mean "same name" and/or "same content" and/or "same date stamp". Furthermore, when moving the files to an external drive, do you wish to maintain the existing folder structure? When you have three or more files that are duplicated ("triplicated"), what strategy do you intend to apply?
- Edited by OberwaldMicrosoft Community Contributor Tuesday, February 05, 2013 4:24 PM
-
Tuesday, February 05, 2013 4:43 PM
Thanks mjolinor,
I mean identical files/date creation and content.
Oberwald
I'm looking for something in batch or vbs.
Regarding Move to External I mean...
-If there are more than one copy of same file, move it.
-when moving, keep the folders structure. (main purpose is reduce file server space).
Thanks a lot
Thiago Pereira | www.winsec.org
-
Tuesday, February 05, 2013 4:45 PMModerator
Hi,
This purpose of this forum is to help with scripting questions. If you have an existing script, please post it and tell what problems you have (along with any exact error messages). If you don't have a script and are expecting someone to write one for you, you are not in the correct forum, as we really don't have the resources to do free consulting work.
Bill
-
Tuesday, February 05, 2013 4:56 PM
AbqBill,
Look to my profile and you will see that I'm not looking for free consulting, I'm just not too good with scripting. Maybe I was not clear enough but I already understand all of you here.
Thanks a lot for all your "help".
Thiago Pereira | www.winsec.org
-
Tuesday, February 05, 2013 5:03 PMModerator
Hi,
We are all beginners some time. This is why we recommend learning resources to help beginners get started. For example, there is a Learn link right at the top of this forum.
The problem is that your question is not a specific scripting question but rather a general request for someone to design a script for you. Script design, specification, testing, and adaptation are really beyond the scope of this forum.
In other words, we are glad to help with specific questions if you are writing a script and get stuck, but it's not the purpose of this forum to write feature-complete scripts on demand. If you need that kind of service, you will likely need to pay someone.
Bill
-
Tuesday, February 05, 2013 5:28 PM
Oberwald
I'm looking for something in batch or vbs.
Regarding Move to External I mean...
-If there are more than one copy of same file, move it.
-when moving, keep the folders structure. (main purpose is reduce file server space).
Thanks a lot
Thiago Pereira | www.winsec.org
Here is a pseudo-code example that would do the trick:
- Create a recursive list of files that looks like this:
FileName|DateStamp|CheckSum FilePath - Sort this list.
- Identify duplicate, triplicate or multiple records.
- Move all multiples to your external storage medium while maintaining the FilePath.
This is not a trivial task. Furthermore I suspect that you will not gain a lot of server storage space but then I suspect you already know this in view of your extensive experience with Server 2003.
- Marked As Answer by Bill_StewartMicrosoft Community Contributor, Moderator Tuesday, February 05, 2013 8:15 PM
- Create a recursive list of files that looks like this:
-
Tuesday, February 05, 2013 5:47 PMModerator
Oberwald is absolutely correct in his assessment. Duplicate file detection is not a trivial task.
Bill
-
Tuesday, February 05, 2013 7:02 PMThank You Guys.
Thiago Pereira | www.winsec.org

