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
33 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
  • 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
Master Your Team's Linux and Cloud Stack

Come see why top tech companies like Mailchimp and Media Temple use Linux Academy to build their employee training programs.

 
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

Simplifying Server Workload Migrations

This use case outlines the migration challenges that organizations face and how the Acronis AnyData Engine supports physical-to-physical (P2P), physical-to-virtual (P2V), virtual to physical (V2P), and cross-virtual (V2V) migration scenarios to address these challenges.

Question has a verified solution.

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

Today, still in the boom of Apple, PC's and products, nearly 50% of the computer users use Windows as graphical operating systems. If you are among those users who love windows, but are grappling to keep the system's hard drive optimized, then you s…
This script can help you clean up your user profile database by comparing profiles to Active Directory users in a particular OU, and removing the profiles that don't match.
The viewer will learn the basics of jQuery, including how to invoke it on a web page. Reference your jQuery libraries: (CODE) Include your new external js/jQuery file: (CODE) Write your first lines of code to setup your site for jQuery.: (CODE)
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…

776 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