comparing folder names

bwanaaa

Senior member
Dec 26, 2002
739
1
81
i have hundreds of folders with different names. some of the folders' names have typos. the result is that there are bunch of folders whose names differ by one or two characters. is there a way to search for folder names that differ by only one or two characters?

I dont have the skill to write an app from the ground up and compile it so i think the best thing for me would be a .bat file. Most file comparison apps out there only compare files not folder names. Suggestions?
 

Patterner

Senior member
Dec 20, 2010
227
0
0
Try powershell. It's similar enough to batch file language to be familiar to someone who understands that, but is much more powerful, a la shell scripting languages from the *nix world. That said, it *is* extremely verbose.

This site seems to have a pretty good run down of the file system specific commands.
 

bwanaaa

Senior member
Dec 26, 2002
739
1
81
tnx. so i guess that morphs my question into:

how do i write a regular expression to list all folders whose names differ by only 2 or 3 characters?

these character differences can be anywhere in the name (as typically typos can occur anywhere)

Then of course I have to peruse the list, move the files from each 'bad' folder to the corresponding 'good folder', and delete the bad folder
 

Aluvus

Platinum Member
Apr 27, 2006
2,913
1
0
how do i write a regular expression to list all folders whose names differ by only 2 or 3 characters?

Regular expressions are not a good tool for this purpose, although with enough contortion you could probably make it work. Iteratively comparing substrings would also work and be perhaps slightly less painful (here is an example in Perl).

I would suggest instead that you find a tool capable of determining edit distance or of performing fuzzy matching. The String::Approx Perl module (available on CPAN) suggests:

If you want to compare strings for similarity, you probably just want the Levenshtein edit distance (explained below), the Text::Levenshtein and Text::LevenshteinXS modules in CPAN. See also Text::WagnerFischer and Text:hraseDistance. (There are functions for this in String::Approx, e.g. adist(), but their results sometimes differ from the bare Levenshtein et al.)

These solutions are of course specific to Perl, but edit distance is just a general concept and could be implemented in whatever language suits you.
 

crowmaine

Member
Mar 4, 2007
67
2
71
Here's Everything, a quick resident program that may be of some help.
From http://www.voidtools.com/:

Everything search engine
Locate files and folders by name instantly.

  • Small installation file
  • Clean and simple user interface
  • Quick file indexing
  • Quick searching
  • Minimal resource usage
  • Share files with others easily
  • Real-time updating
  • More...

It will index all folder and file names on all of your drives. This list can be searched with its powerful search, using Regex or basic DOS, e.g., "My*.mp3". You can launch the file or application from its window. It will help you find duplicate named files and folders that reside throughout your machine.

Hope this help. As this this shareware, please contribute to its developer if you find it helpful.

Enjoy.
 
sale-70-410-exam    | Exam-200-125-pdf    | we-sale-70-410-exam    | hot-sale-70-410-exam    | Latest-exam-700-603-Dumps    | Dumps-98-363-exams-date    | Certs-200-125-date    | Dumps-300-075-exams-date    | hot-sale-book-C8010-726-book    | Hot-Sale-200-310-Exam    | Exam-Description-200-310-dumps?    | hot-sale-book-200-125-book    | Latest-Updated-300-209-Exam    | Dumps-210-260-exams-date    | Download-200-125-Exam-PDF    | Exam-Description-300-101-dumps    | Certs-300-101-date    | Hot-Sale-300-075-Exam    | Latest-exam-200-125-Dumps    | Exam-Description-200-125-dumps    | Latest-Updated-300-075-Exam    | hot-sale-book-210-260-book    | Dumps-200-901-exams-date    | Certs-200-901-date    | Latest-exam-1Z0-062-Dumps    | Hot-Sale-1Z0-062-Exam    | Certs-CSSLP-date    | 100%-Pass-70-383-Exams    | Latest-JN0-360-real-exam-questions    | 100%-Pass-4A0-100-Real-Exam-Questions    | Dumps-300-135-exams-date    | Passed-200-105-Tech-Exams    | Latest-Updated-200-310-Exam    | Download-300-070-Exam-PDF    | Hot-Sale-JN0-360-Exam    | 100%-Pass-JN0-360-Exams    | 100%-Pass-JN0-360-Real-Exam-Questions    | Dumps-JN0-360-exams-date    | Exam-Description-1Z0-876-dumps    | Latest-exam-1Z0-876-Dumps    | Dumps-HPE0-Y53-exams-date    | 2017-Latest-HPE0-Y53-Exam    | 100%-Pass-HPE0-Y53-Real-Exam-Questions    | Pass-4A0-100-Exam    | Latest-4A0-100-Questions    | Dumps-98-365-exams-date    | 2017-Latest-98-365-Exam    | 100%-Pass-VCS-254-Exams    | 2017-Latest-VCS-273-Exam    | Dumps-200-355-exams-date    | 2017-Latest-300-320-Exam    | Pass-300-101-Exam    | 100%-Pass-300-115-Exams    |
http://www.portvapes.co.uk/    | http://www.portvapes.co.uk/    |