Solved

How may I search a path for all folders with similar titles without specifying a specific keyword? (Windows)

Posted on 2015-02-05
9
35 Views
Last Modified: 2016-06-19
Hey Guys -

I've got a simple and straightforward question.  I have large media libraries separated by category, but all in a single path.  Each title is in it's own folder including the title of the media, year created, and resolution.  I have many duplicate titles which sometimes are created by automated processes.

Question
How may I search a path for all folders with similar titles without specifying a specific keyword?  

Example
Below are a few sample folder names...
- Title 1 [1990] 720p
- Title 2 [2012] 1080p
- Title 2 [2012] 720p
- Title 3 [2004] 720p
- Title 4 [2003] 1080p

I'm trying to find a way to search which will show both "Title 2" folders as results - not based on searching for the specific title, but because they are similar.

I'm using Windows 8.1 Update 1 x64.  I'd think any app or script would work.

Thanks!
0
Comment
Question by:BzowK
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
  • 3
  • 2
  • 2
9 Comments
 
LVL 24

Expert Comment

by:Phillip Burton
ID: 40591149
You need a program which could catalog the names and then allow you to analyse them.

I would suggest trying either Filecats Explore or Filecats Standard, depending on whether you have Excel or not. You can then do analyses such as PivotTables in Excel and try to identify particular groupings.

Alternatively, do a catalog in Command Prompt using something like:

dir *.* /s >>c:\b\export.bat

and then open c:\b\export.bat in Excel as a fixed-length text file, and do the analysis from there.
0
 
LVL 24

Expert Comment

by:NVIT
ID: 40591404
Can you clarify the differences? Provide some root folder names and their  subfolders?

Do you mean for instance, in folder "Title 1 [1990] 720p", you may have a same filename as in folder "Title 2 [2012] 1080p"?
0
 

Author Comment

by:BzowK
ID: 40591513
Thanks Guys -

I appreciate the suggestion of Pivot Tables, but honestly don't know that much about them.  I was kind of hoping for a script or app that was fairly straight forward instead of so many steps.  If multiple steps was my only option, I could probably do it faster manually.

Here is a more in-depth example and folder structure of some of the movie folders I wish to scan.  I have a huge disc collection and have invested tons of time ripping them to digital media.

D:\Media
 - D:\Media\Movies
   - D:\Media\Movies\Movie1 [1980] 720p
   - D:\Media\Movies\Movie2 [2003] 1080p
   - D:\Media\Movies\Movie2 [2003] 480i
   - D:\Media\Movies\Movie3 [1999] 720p
   ... (plus many, many more)

I'm wanting to scan "D:\Media\Movies" to search for all folder names which have a similar title such as "Movie2" without specifying to search for the text "Movie2" specifically.  If performed on just the above examples, I would want the results to be:
   - D:\Media\Movies\Movie2 [2003] 1080p
   - D:\Media\Movies\Movie2 [2003] 480i

The only catch (which I just thought of) is all the non-title text like year and resolution.  Since all folder names are in the same format, I'd want the script / app to just search and compare either the first X charachters of a folder's name only or better yet search and compare each folder's name except for the last 12 charachters ( [xxxx] xxxx.)

Hope that helps - Thanks!
0
Guide to Performance: Optimization & Monitoring

Nowadays, monitoring is a mixture of tools, systems, and codes—making it a very complex process. And with this complexity, comes variables for failure. Get DZone’s new Guide to Performance to learn how to proactively find these variables and solve them before a disruption occurs.

 
LVL 24

Expert Comment

by:Phillip Burton
ID: 40591557
I would still suggest cataloging the directory and do your manual check that way, from either inside Excel or another table.
0
 
LVL 24

Accepted Solution

by:
NVIT earned 500 total points
ID: 40591877
Not the swiftest but it works. Sends found results to file FoundMulti.txt.
@echo off
setlocal

set RPath=D:\Media\Movies
for /f "tokens=1*" %%a in ('dir /ad /b %RPath%\*') do (
  call :FindMulti %%a %%b %%c
)
goto :eof

:FindMulti
dir /b /ad>FindMulti.txt
for /f "tokens=3*" %%a in ('find /c "%1" findmulti.txt') do (
  if "%%a" geq "2" (
    echo Found multiples of: %1
    echo %RPath%\%1 %2 %3>>FoundMulti.txt
  )
)
del /a FindMulti.txt

Open in new window

0
 

Author Comment

by:BzowK
ID: 40705429
Thanks!  Let me try these and will re-post shortly - Thanks again!
0
 
LVL 24

Expert Comment

by:NVIT
ID: 41660772
NVIT's post at ID: https:#a40591877 solves the problem.
0

Featured Post

Industry Leaders: We Want Your Opinion!

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

OfficeMate Freezes on login or does not load after login credentials are input.
This article explains how to prepare an HTML email signature template file containing dynamic placeholders for users' Azure AD data. Furthermore, it explains how to use this file to remotely set up a department-wide email signature policy in Office …
The viewer will learn how to count occurrences of each item in an array.
This tutorial will teach you the core code needed to finalize the addition of a watermark to your image. The viewer will use a small PHP class to learn and create a watermark.

730 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question