Filename extension

General questions about using ExamDiff Pro, ideas for new features, bug reports, and usage tips.
Post Reply
mnementh
New Member
Posts: 3
Joined: Tue Aug 09, 2016 1:10 am

Filename extension

Post by mnementh »

Hi everyone.

I'm a new member of this forum, so before I bend your ears for information, I thought it would be polite to introduce myself.

First name is Sandy
Scottish
Male
64 years old
Santa Claus look-alike (sadly, no flying sleigh)
Am Dragon happy, hence the username.
Work in Communications as Electronics Technician.
Hobbies include Electronics, photography, Karaoke and model yachts.

My request for info is pretty straightforward but I can't figure out how to do it with the filter options available.

As you can see, one of my hobbies is running a Karaoke and this is my request need.

I have 50,000+ tracks on my system and for those that don't know how it works, here's a very simple run down.

You have two files, one is an MP3 format music track and the other is a CDG graphic file. Both files MUST have identical filenames EXCEPT for the 3 digit extension, i.e. SF001-01 - rod stewart - maggie mae.MP3 plus SF001-01 - rod stewart - maggie mae.CDG

I have the NP3 files in one folder and the CDG's in another.

However, on checking, I found I have many more files of one type than the other, so to the crux of my query.

I want to compare folders but IGNORE the .MP3 and .CDG extension part of the filename, so only the non "twinned" files show up.

As you might imagine, trawling through 25,000 lines isn't easy.

Is there any way to compare folders ignoring filename extension?

Thanks in advance,
Sandy.
User avatar
psguru
Site Admin
Posts: 2297
Joined: Sat May 15, 2004 4:23 pm
Location: California
Contact:

Re: Filename extension

Post by psguru »

Welcome to the forum, Sandy.

No, unfortunately it's not possible in the current version.
psguru
PrestoSoft
MSpagni
Expert Member
Posts: 584
Joined: Mon Mar 30, 2009 12:53 am
Location: Italy

Re: Filename extension

Post by MSpagni »

Hello, Sandy.

Well, I suppose you don't have 25000 files (or more :wink:) in a single directory, do you?

My suggestion goes like this:

Code: Select all

for /r "my-mp3-dir" %A in (*.mp3) do @echo %~pnA >> mp3.txt
for /r "my-cdg-dir" %A in (*.cdg) do @echo %~pnA >> cdg.txt
examdiff mp3.txt cdg.txt
N.B. If you put the above script in a batch file, please replace "%" with "%%".

Of course this is just for inspection.
If you want something much, much more powerful for managing your files I suggest xplorer2 (http://zabkat.com/).
I'm not sure if you can do what you want with the free version (http://zabkat.com/x2lite.htm) because I'm using the professional version since version 1. :D
mnementh
New Member
Posts: 3
Joined: Tue Aug 09, 2016 1:10 am

Re: Filename extension

Post by mnementh »

Hi guys (Gals???),
many thanks for the quick replies.

Attn MSpagni; Yes I DO mean I have more than 25,000+ files in each folder. In fact, it's now 52,000 files in each and will be >100,000 by the time I get all my Karaoke stuff sorted out.

The main hassle any KJ has with so many files is that even though there is a naming convention, many sources screw it around and we end up with 1,000's of duplicate files that just waste disk space.

I really loathe the NTFS file system but FAT32 limits the number of files per folder and as a result, I have files all over the place on various external drives and I really needed to concentrate it all together. NTFS allows millions of files per folder.

Onyhoo, on my problem, I solved it by generous application of the old Chinese method of the Chi'ting :mrgreen:

I simply renamed all the MP3 extensions to CDG and then compared the two folders again.

Sorted out all the issues and then named the files back to MP3.

This was a minor pain in the butt as it took a fair bit of time but I then found a freeware utility called "Bulk Extension Changer" that changes ALL the file extensions in a folder in seconds.

I would suggest that some form of filename.ext exclusion option is a good idea for file comparison.

Again, thanks for the assist.

Sandy.
MSpagni
Expert Member
Posts: 584
Joined: Mon Mar 30, 2009 12:53 am
Location: Italy

Re: Filename extension

Post by MSpagni »

FAT32 limits the number of files per folder
Ehm, yes! Since FAT32 can't allocate files bigger than 4 GB then each subdir, being a special kind of file but always a file, can't be bigger than that, but I think it can contain a fair number of files. :wink:
If I remember well, the root directory has a lower limit on the number of files.

The problem is that, when the number of files in a dir goes way up, the file search and handling funtions of the operating system become sloooow.
I would suggest to split the files in directory trees, for example a subdir for each initial letter.
Then, maybe, other subdirs, one for each author.
The only warning is not to reach a path too long. This depends not just on the number of nested subdirs but also on the length of their names.
I then found a freeware utility called "Bulk Extension Changer" that changes ALL the file extensions in a folder in seconds.
Another "freeware" utility:

Code: Select all

ren *.mp3 *.cdg
or, if you are sure:

Code: Select all

ren *.* *.cdg
Then, of course:

Code: Select all

ren *.cdg *.mp3
Anyway, glad you solved your problem.
mnementh
New Member
Posts: 3
Joined: Tue Aug 09, 2016 1:10 am

Re: Filename extension

Post by mnementh »

Again, thanks for the reply.

I did indeed, have my files "sorted" alphabetically but for my purpose, that is to generate a minimum page count song book, having the files all together makes life much easier.

There are more than 20 suppliers of Karaoke songs and each one might have a version of any given popular song by one artist, then there are cover version to take into account.

Unfortunately, singers tend to prefer one particular version over another and we need to keep them all. However, my goal is to only list one version of any given song by a given singer but still be able to provide the preferred version from the singer's history.

My song book with no reduction would run to >1000 pages, easily but with reductions, I believe I can get it down to a manageable 300 - 400 pages.

The main problem with a massive song book is that the audience spends so much time trying to find a song that they never actually pick one.

I enjoyed the code samples you provided and they took me back to my first computing days of DOS 3.0 when the biggest hard drives were 32Mb !!!

I still have all my floppies with the various boot systems, right up to DOS 6.2.

I can still get myself round most DOS commands but I find I have to think about it a lot more as GUI laziness has crept in.

Anyway, thanks again for your help.

Sandy.
User avatar
psguru
Site Admin
Posts: 2297
Joined: Sat May 15, 2004 4:23 pm
Location: California
Contact:

Re: Filename extension

Post by psguru »

This came via email from a long-time ExamDiff Pro user:
Guys, you CAN simply do this in ExamDiff Pro by:
1 first comparing both directories with minimal effort (quickly compare by file properties only, not full comparison)
2 select all contents in both directories
3 copy those as text
4 compare them in another instance of ExamDiff Pro

This does NOT involve having to rename each file, so avoids the risk of ever losing any file extension or even accidentally renaming a wrong file (wrong extension in one directory) to the "correct" one after having compared the "files".
psguru
PrestoSoft
MSpagni
Expert Member
Posts: 584
Joined: Mon Mar 30, 2009 12:53 am
Location: Italy

Re: Filename extension

Post by MSpagni »

Sorry, I don't understand.
If I copy the content of a directory as text I get something like:
MoonCal.pp 1.080 Source FreePascal 23/05/2014 15.32.04 Same N
I still have the file extension that bothers Sandy and a lot of other stuff not needed and disturbing when comparing the two texts.
I must have missed something.
Perhaps a combination of options different by far from the ones I'm using? :?:
Post Reply