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
29 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 23

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
Backup Your Microsoft Windows Server®

Backup all your Microsoft Windows Server – on-premises, in remote locations, in private and hybrid clouds. Your entire Windows Server will be backed up in one easy step with patented, block-level disk imaging. We achieve RTOs (recovery time objectives) as low as 15 seconds.

 
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 23

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 23

Expert Comment

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

Featured Post

Complete VMware vSphere® ESX(i) & Hyper-V Backup

Capture your entire system, including the host, with patented disk imaging integrated with VMware VADP / Microsoft VSS and RCT. RTOs is as low as 15 seconds with Acronis Active Restore™. You can enjoy unlimited P2V/V2V migrations from any source (even from a different hypervisor)

Question has a verified solution.

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

Sometimes drives fill up and we don't know why.  If you don't understand the best way to use the tools available, you may end up being stumped as to why your drive says it's not full when you have no space left!  Here's how you can find out...
I thought I'd write this up for anyone who has a request to create an anonymous whistle-blower-type submission form created using SharePoint 2010 (this would probably work the same for 2013). It's not 100% fool-proof but it's as close as you can get…
The viewer will learn how to count occurrences of each item in an array.
Video by: Mark
This lesson goes over how to construct ordered and unordered lists and how to create hyperlinks.

867 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

Need Help in Real-Time?

Connect with top rated Experts

17 Experts available now in Live!

Get 1:1 Help Now