?
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
Medium Priority
?
38 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 25

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
Get 15 Days FREE Full-Featured Trial

Benefit from a mission critical IT monitoring with Monitis Premium or get it FREE for your entry level monitoring needs.
-Over 200,000 users
-More than 300,000 websites monitored
-Used in 197 countries
-Recommended by 98% of users

 
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 25

Accepted Solution

by:
NVIT earned 2000 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 25

Expert Comment

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

Featured Post

Does Powershell have you tied up in knots?

Managing Active Directory does not always have to be complicated.  If you are spending more time trying instead of doing, then it's time to look at something else. For nearly 20 years, AD admins around the world have used one tool for day-to-day AD management: Hyena. Discover why

Question has a verified solution.

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

A procedure for exporting installed hotfix details of remote computers using powershell
Recently we ran in to an issue while running some SQL jobs where we were trying to process the cubes.  We got an error saying failure stating 'NT SERVICE\SQLSERVERAGENT does not have access to Analysis Services. So this is a way to automate that wit…
The viewer will learn how to successfully download and install the SARDU utility on Windows 8, without downloading adware.
The Task Scheduler is a powerful tool that is built into Windows. It allows you to schedule tasks (actions) on a recurring basis, such as hourly, daily, weekly, monthly, at log on, at startup, on idle, etc. This video Micro Tutorial is a brief intro…
Suggested Courses

771 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