Jump to content
Sign in to follow this  
mikey8811

Renaming Recovered FLAC Files In A Large Batch From Hard Disk Crash On Mac OS

Rate this topic

Recommended Posts

Hi

 

 

I hope this is the correct area to post this.

 

 

I was hoping someone would be able to help me with a problem I have. Over the years, I had accumulated a decent sized music library of FLAC files but lost them all due to a hard drive crash with no backup. I sent the drive for data recovery and due to the file allocation tables and headers being damaged, they recovered the data but without the original names.

 

 

The allocated file names are like:

 

 

AA00EECDEFG1.FLAC

 

 

I can load the files onto eXACT and the tags and metadata are still there.

 

 

It would be extremely time consuming to manually load every single file to eXACT and then rename the files from the meta data.

 

Would you be so kind as to point me to a more efficient way to do this or a programme that is available which is able to batch rename the FLAC files from the meta data and tags?

 

Thanks and regards

Share this post


Link to post
Share on other sites

Thanks Samirevah

 

I downloaded the Mac version and dragged one file into the interface - it did drag up the Title, Artist and Album.

 

That's as far as I went. I have about 10 subfolders of these FLAC files. Each subfolder has about 1,500 files (tracks or songs). Any pointers for a newbie as to how to proceed?

 

I tried "Help" but it said it was unable to display it in my browser. How do I find a manual?

 

Thanks

Share this post


Link to post
Share on other sites
Thanks Samirevah

 

I downloaded the Mac version and dragged one file into the interface - it did drag up the Title, Artist and Album.

 

That's as far as I went. I have about 10 subfolders of these FLAC files. Each subfolder has about 1,500 files (tracks or songs). Any pointers for a newbie as to how to proceed?

 

I tried "Help" but it said it was unable to display it in my browser. How do I find a manual?

 

Thanks

 

Mp3tag Help - Content

Share this post


Link to post
Share on other sites

First off, back up your recovered files.

 

Next, Assuming your flac files have the correct tags...

 

In MP3Tag drive the top level folder, all the folders and sub folders should be read giving you 1,000 of files.

Goto <edit> and <select all>

Now go <convert> and select <tag - filename>

In the pop up box type something like

%artist%/%album%/%track% - %title%

When you select okay this will rename everything, putting them into an Artist / Album hierarchy naming the files with track number then the track title.

 

You can go a lot more complex than this if you desire but that's a good start.


Eloise

---

...in my opinion / experience...

While I agree "Everything may matter" working out what actually affects the sound is a trickier thing.

And I agree "Trust your ears" but equally don't allow them to fool you - trust them with a bit of skepticism.

keep your mind open... But mind your brain doesn't fall out.

Share this post


Link to post
Share on other sites

Thanks Audio_ELF / Eloise.

 

Very helpful. I gave this further thought and a plan of sorts has begun to take shape. If I follow the steps you listed above, presumably (and fingers crossed) I will end up with 10 folders of files named after the track number and song titles. The 10 folders have no particular meaning other than I grouped them by number of files for easier resorting. Tracks from different albums appear in the same folder and tracks from the same album may have spilled over to the next folder. I will still have to sort them out into sub folders named after "Artist - Album Title (Year of Release)". If it is not too much to ask of the programme, does it also sort and reorganise these named tracks into subfolders by album title and rename these subfolders too?

 

Is there a more logical and efficacious way to go about this?

 

Thanks again

Share this post


Link to post
Share on other sites
Very helpful. I gave this further thought and a plan of sorts has begun to take shape. If I follow the steps you listed above, presumably (and fingers crossed) I will end up with 10 folders of files named after the track number and song titles. [...snip...]

Not quite...

 

Assuming you have a folder called flacfiles and within that you have flacs1... flacs2... etc upto flacs10.

 

If you drag "flacflies" into MP3Tag, you will see all the files from flacs1 to flacs10.

 

Following the directions I gave above, all the files will be reordered under the root folder of flacfiles so you will end up with

flacfiles/album1; flacfiles/album2; flacfiles/album2; etc.

 

Eloise

 

PS. just to note I was slightly incorrect in the syntax I lists ... you should actually use \ in the convert string rather than / so

%artist%/%album%/%track% - %title%

is incorrect it should be

%artist%\%album%\%track% - %title%


Eloise

---

...in my opinion / experience...

While I agree "Everything may matter" working out what actually affects the sound is a trickier thing.

And I agree "Trust your ears" but equally don't allow them to fool you - trust them with a bit of skepticism.

keep your mind open... But mind your brain doesn't fall out.

Share this post


Link to post
Share on other sites

Cool, thanks.

 

I'll give it a whirl.

 

This works for APE and Wavpacks too right? I have some - not a lot of these.

 

The other issue is these files are what the data recovery service gave me back - when I did checksums randomly on eXact, not all of them were good. Is there a batch checksum programme to do all of them at once like this batch renaming? eXact doesn;t take many which was why I started breaking them down into subfolders.

 

Thanks again

Share this post


Link to post
Share on other sites
This works for APE and Wavpacks too right? I have some - not a lot of these.

It will work with any and all supported MP3Tag formats.


Eloise

---

...in my opinion / experience...

While I agree "Everything may matter" working out what actually affects the sound is a trickier thing.

And I agree "Trust your ears" but equally don't allow them to fool you - trust them with a bit of skepticism.

keep your mind open... But mind your brain doesn't fall out.

Share this post


Link to post
Share on other sites
Not quite...

 

Assuming you have a folder called flacfiles and within that you have flacs1... flacs2... etc upto flacs10.

 

If you drag "flacflies" into MP3Tag, you will see all the files from flacs1 to flacs10.

 

Following the directions I gave above, all the files will be reordered under the root folder of flacfiles so you will end up with

flacfiles/album1; flacfiles/album2; flacfiles/album2; etc.

 

Eloise

 

PS. just to note I was slightly incorrect in the syntax I lists ... you should actually use \ in the convert string rather than / so

%artist%/%album%/%track% - %title%

is incorrect it should be

%artist%\%album%\%track% - %title%

 

 

Hi Eloise

 

I finally got around to renaming the files using mp3tag, trying the first batch. It seemed to take up a fair bit of CPU power, the temperature on my MacBook went up to 91 degrees C.

 

I got the following errors for all files:

 

File "\\?\unix\Volumes\Old Files Recovered\3649030 (FLAC Deleted)\01\0A2A7960.FLAC" cannot be renamed to "\\\unix\Volumes\Old Files Recovered\3649030 (FLAC Deleted)\01\Booker T. Jones\ The Road From Memphis\ 05\ Down In Memphis (Featuring Booker T on vocals).flac".

Path not found.

 

File "\\?\unix\Volumes\Old Files Recovered\3649030 (FLAC Deleted)\01\0A2B31E0.FLAC" cannot be renamed to "\\\unix\Volumes\Old Files Recovered\3649030 (FLAC Deleted)\01\Booker T. Jones\ The Road From Memphis\ 11\ The Bronx (Featuring Lou Reed).flac".

Path not found.

 

File "\\?\unix\Volumes\Old Files Recovered\3649030 (FLAC Deleted)\01\0A2C0718.FLAC" cannot be renamed to "\\\unix\Volumes\Old Files Recovered\3649030 (FLAC Deleted)\01\Anthony Braxton\ Italian Instabile Orchestra\ 04\ Composition No. 92 part 2.flac".

Path not found.

 

File "\\?\unix\Volumes\Old Files Recovered\3649030 (FLAC Deleted)\01\0A2EC308.FLAC" cannot be renamed to "\\\unix\Volumes\Old Files Recovered\3649030 (FLAC Deleted)\01\J. J. Johnson\ The Complete '60s Bigband Recordings- Disc 1\ 02\ So What.flac".

Path not found.

 

Can you tell me if the syntax is wrong? I followed your instructions.

 

The files are on a external USB drive (called Old Files Recovered) connected to my MacBook.

 

Under mp3tag, when I try to choose the directory by browsing on the interface, I cannot locate the external drive. I canonly get to the files by dragging the directory (\\?\unix\Volumes\Old Files Recovered\3649030 (FLAC Deleted)\01\ ) to the input window.

 

It seems to read the metadata alright - the only thing is it doesn't seem to do the renaming.

 

Your help and feedback much appreciated.

 

Thanks

Share this post


Link to post
Share on other sites
Hi Eloise

 

I finally got around to renaming the files using mp3tag, trying the first batch. It seemed to take up a fair bit of CPU power, the temperature on my MacBook went up to 91 degrees C.

 

I got the following errors for all files:

 

File "\\?\unix\Volumes\Old Files Recovered\3649030 (FLAC Deleted)\01\0A2A7960.FLAC" cannot be renamed to "\\\unix\Volumes\Old Files Recovered\3649030 (FLAC Deleted)\01\Booker T. Jones\ The Road From Memphis\ 05\ Down In Memphis (Featuring Booker T on vocals).flac".

Path not found.

 

File "\\?\unix\Volumes\Old Files Recovered\3649030 (FLAC Deleted)\01\0A2B31E0.FLAC" cannot be renamed to "\\\unix\Volumes\Old Files Recovered\3649030 (FLAC Deleted)\01\Booker T. Jones\ The Road From Memphis\ 11\ The Bronx (Featuring Lou Reed).flac".

Path not found.

 

File "\\?\unix\Volumes\Old Files Recovered\3649030 (FLAC Deleted)\01\0A2C0718.FLAC" cannot be renamed to "\\\unix\Volumes\Old Files Recovered\3649030 (FLAC Deleted)\01\Anthony Braxton\ Italian Instabile Orchestra\ 04\ Composition No. 92 part 2.flac".

Path not found.

 

File "\\?\unix\Volumes\Old Files Recovered\3649030 (FLAC Deleted)\01\0A2EC308.FLAC" cannot be renamed to "\\\unix\Volumes\Old Files Recovered\3649030 (FLAC Deleted)\01\J. J. Johnson\ The Complete '60s Bigband Recordings- Disc 1\ 02\ So What.flac".

Path not found.

 

Can you tell me if the syntax is wrong? I followed your instructions.

 

The files are on a external USB drive (called Old Files Recovered) connected to my MacBook.

 

Under mp3tag, when I try to choose the directory by browsing on the interface, I cannot locate the external drive. I canonly get to the files by dragging the directory (\\?\unix\Volumes\Old Files Recovered\3649030 (FLAC Deleted)\01\ ) to the input window.

 

It seems to read the metadata alright - the only thing is it doesn't seem to do the renaming.

 

Your help and feedback much appreciated.

 

Thanks

 

You get a triple backslash, which is not allowed. It seems to occur because of the removal of the ?.


Synology DS214+ with MinimServer --> Ethernet --> Sonore mRendu --> Chord Hugo --> Chord interconnects --> Naim NAP 200--> Chord speaker cable --> Focal Aria 948

Share this post


Link to post
Share on other sites
You get a triple backslash, which is not allowed. It seems to occur because of the removal of the ?.

 

OK, so what should I do to make it work?

Share this post


Link to post
Share on other sites

Hi

 

Up for some help please.

 

The path directory still seems to be like :

 

"\\?\unix\Volumes\Old Files Recovered\3649030 (FLAC Deleted)\01\0A2C0718.FLAC"

 

How do I get rid of the "?" ?

 

Thanks

Share this post


Link to post
Share on other sites
Hi

 

Up for some help please.

 

The path directory still seems to be like :

 

"\\?\unix\Volumes\Old Files Recovered\3649030 (FLAC Deleted)\01\0A2C0718.FLAC"

 

How do I get rid of the "?" ?

 

Thanks

 

Wrong question :-) The question should be what "?" represents. And you already managed to get rid of "?". You should get rid of "\?" from what I can see as your path should start with "\\" not "\\\". But it is difficult to judge without seeing what you're doing. Do you know what the path should read? Also, which process in MP3Tag did you use? Actions or something else?


Synology DS214+ with MinimServer --> Ethernet --> Sonore mRendu --> Chord Hugo --> Chord interconnects --> Naim NAP 200--> Chord speaker cable --> Focal Aria 948

Share this post


Link to post
Share on other sites
Wrong question :-) The question should be what "?" represents. And you already managed to get rid of "?". You should get rid of "\?" from what I can see as your path should start with "\\" not "\\\". But it is difficult to judge without seeing what you're doing. Do you know what the path should read? Also, which process in MP3Tag did you use? Actions or something else?

 

I am just using File -> Change Directory and then browsing the directory where the FLAC files are located.

 

Under the path in the mp3tag interface, when I browse, the internal volume shows up as "/"

 

The external drives all show up under the subdirectory "Volumes". This particular drive shows up in a further subdirectory "Old Files Recovered"

 

The full path shows up as

 

"\\?\unix\Volumes\Old Files Recovered\3649030 (FLAC Deleted)\01\0A2C0718.FLAC"

 

 

So it is having a problem with the internal volume itself I think because the "?" is added even before the "Volumes" subdirectory. Once again, this is just my guess with my limited knowledge.

 

I just tried using the iTunes subdirectory on the internal volume (Macintosh HD) and even so, it is showing up as:

 

"\\?\unix\Music_1\iTunes\iTunesMusic\"

 

under the mp3tag Directory window.

 

So I guess mp3tag will not work even on an internal volume.

 

All Mac OS X drives internal and external, USB or Firewire will appear under the "Volumes" directory. I have another Firewire drive called My Book attached to the same Mac, where I copied the files to. It appears as:

 

\\?\unix\Volumes\My Book\

 

mp3tag will append any Mac OS X hard disk with "\\?\unix\" before the disk or directory name. From then, you cannot rename the files because the "?" is illegal.

 

That I think is the problem and cannot think of a solution.

Share this post


Link to post
Share on other sites
I am just using File -> Change Directory and then browsing the directory where the FLAC files are located.

 

Under the path in the mp3tag interface, when I browse, the internal volume shows up as "/"

 

The external drives all show up under the subdirectory "Volumes". This particular drive shows up in a further subdirectory "Old Files Recovered"

 

The full path shows up as

 

"\\?\unix\Volumes\Old Files Recovered\3649030 (FLAC Deleted)\01\0A2C0718.FLAC"

 

 

So it is having a problem with the internal volume itself I think because the "?" is added even before the "Volumes" subdirectory. Once again, this is just my guess with my limited knowledge.

 

I just tried using the iTunes subdirectory on the internal volume (Macintosh HD) and even so, it is showing up as:

 

"\\?\unix\Music_1\iTunes\iTunesMusic\"

 

under the mp3tag Directory window.

 

So I guess mp3tag will not work even on an internal volume.

 

All Mac OS X drives internal and external, USB or Firewire will appear under the "Volumes" directory. I have another Firewire drive called My Book attached to the same Mac, where I copied the files to. It appears as:

 

\\?\unix\Volumes\My Book\

 

mp3tag will append any Mac OS X hard disk with "\\?\unix\" before the disk or directory name. From then, you cannot rename the files because the "?" is illegal.

 

That I think is the problem and cannot think of a solution.

 

I wonder if the problem lies in the fact that mp3tag is a windows program that you are running on OS X through an emulator such as Wine.


Girl, you want it, you take it, you pay the price

Share this post


Link to post
Share on other sites

A (bash) script is perhaps the most appropriate solution.

I do not use Mac (Linux only) but bash syntax is the same.

In this case only renames flac files, not to directories. It can be modified to do so.

I recommend you try it in a directory created for this purpose (with a copy of some flac files in multiple directories) to see if it does what you expect.

The format is: track n° - title

 

You only need to install flac and metaflac if you did not. You can check this by opening a terminal and typing metaflac --help.

If the program is recognized skip to 2-

 

1- If the program is not recognized, you must install:

- with Homebrew

brew install flac

-Or downloading binary (eg Rarewares, not the latest version but anyway) and copying it to your PATH -as root or with sudo- eg:

mv flac metaflac /usr/local/bin
cd /usr/local/bin
chmod a+x metaflac flac

 

2- If you already have them installed, copy the following into an empty file:

#!/bin/bash

for i in *.flac
do

TITLE=`metaflac "$i" --show-tag=TITLE | sed s/.*=//g`
TRACKNUMBER=`metaflac "$i" --show-tag=TRACKNUMBER | sed s/.*=//g`
#ARTIST=`metaflac "$i" --show-tag=ARTIST | sed s/.*=//g`
#ALBUM=`metaflac "$i" --show-tag=ALBUM | sed s/.*=//g`

mv "$i" "$TRACKNUMBER - $TITLE.flac"
done

save it, name it as you like (for example renameflac), and move it to your PATH -as root o with sudo- (or you can create a symbolic link, especially if you want to change it later) eg:

mv renameflac /usr/local/bin
cd /usr/local/bin
chmod a+x renameflac

Close the Terminal.

Thus it became a "pseudo-program"

 

3- You have everything ready. Now navigate with the terminal to the directory where you have all the flac:

cd "path/to/directory with flac files/"

in your case I think

cd "/unix/Volumes/Old Files Recovered/"

*It may be more comfortable be placed in the directory with Finder and "Open a Terminal Here"

I think Mac does not have the "Open Terminal Here" function but can be added with ShellHere

In this terminal type:

 find -name "*.flac" -execdir renameflac {} \;

Remember that only renames files, not directories. This can be changed (I am not an expert of bash scripting, but I can try to help)

 

Sorry for my english.

Edited by DMM

[...] "Do fathers always know more than sons?" and the father said, "yes". The next question was, "Daddy, who invented the steam engine?" and the father said, "James Watt." And then the son came back with "- but why didn't James Watt's father invent it?"

Gregory Bateson

Steps to an Ecology of Mind (...)

Share this post


Link to post
Share on other sites
Hi

 

 

I hope this is the correct area to post this.

 

 

I was hoping someone would be able to help me with a problem I have. Over the years, I had accumulated a decent sized music library of FLAC files but lost them all due to a hard drive crash with no backup. I sent the drive for data recovery and due to the file allocation tables and headers being damaged, they recovered the data but without the original names.

 

 

The allocated file names are like:

 

 

AA00EECDEFG1.FLAC

 

 

I can load the files onto eXACT and the tags and metadata are still there.

 

 

It would be extremely time consuming to manually load every single file to eXACT and then rename the files from the meta data.

 

Would you be so kind as to point me to a more efficient way to do this or a programme that is available which is able to batch rename the FLAC files from the meta data and tags?

 

Thanks and regards

 

Check my software user manual. May be it help you. Metatag editor FLAC, DSF, WAV, AIFF DSF Meta Tag Editor - Audio Converter AuI ConverteR 48x44

 


AuI ConverteR 48x44 - HD audio converter/optimizer for DAC of high resolution files

ISO, DSF, DFF (1-bit/D64/128/256/512/1024), wav, flac, aiff, alac,  safe CD ripper to PCM/DSF,

Seamless Album Conversion, AIFF, WAV, FLAC, DSF metadata editor, Mac & Windows
Offline conversion save energy and nature

Share this post


Link to post
Share on other sites
A (bash) script is perhaps the most appropriate solution.

I do not use Mac (Linux only) but bash syntax is the same.

In this case only renames flac files, not to directories. It can be modified to do so.

I recommend you try it in a directory created for this purpose (with a copy of some flac files in multiple directories) to see if it does what you expect.

The format is: track n° - title

 

You only need to install flac and metaflac if you did not. You can check this by opening a terminal and typing metaflac --help.

If the program is recognized skip to 2-

 

1- If the program is not recognized, you must install:

- with Homebrew

brew install flac

-Or downloading binary (eg Rarewares, not the latest version but anyway) and copying it to your PATH -as root or with sudo- eg:

mv flac metaflac /usr/local/bin
cd /usr/local/bin
chmod a+x metaflac flac

 

2- If you already have them installed, copy the following into an empty file:

#!/bin/bash

for i in *.flac
do

TITLE=`metaflac "$i" --show-tag=TITLE | sed s/.*=//g`
TRACKNUMBER=`metaflac "$i" --show-tag=TRACKNUMBER | sed s/.*=//g`
#ARTIST=`metaflac "$i" --show-tag=ARTIST | sed s/.*=//g`
#ALBUM=`metaflac "$i" --show-tag=ALBUM | sed s/.*=//g`

mv "$i" "$TRACKNUMBER - $TITLE.flac"
done

save it, name it as you like (for example renameflac), and move it to your PATH -as root o with sudo- (or you can create a symbolic link, especially if you want to change it later) eg:

mv renameflac /usr/local/bin
cd /usr/local/bin
chmod a+x renameflac

Close the Terminal.

Thus it became a "pseudo-program"

 

3- You have everything ready. Now navigate with the terminal to the directory where you have all the flac:

cd "path/to/directory with flac files/"

in your case I think

cd "/unix/Volumes/Old Files Recovered/"

*It may be more comfortable be placed in the directory with Finder and "Open a Terminal Here"

I think Mac does not have the "Open Terminal Here" function but can be added with ShellHere

In this terminal type:

 find -name "*.flac" -execdir renameflac {} \;

Remember that only renames files, not directories. This can be changed (I am not an expert of bash scripting, but I can try to help)

 

Sorry for my english.

 

 

I have a similar problem as the OP but with a different cause...I used dB Poweramp to convert my library of AIFF files to FLAC so that I could play them in a Kenwood car head unit...the conversion went fine ( but took several days for 2000 CDs ) but all the files ended up as individual FLAC files not in folders so the Kenwood wont recognise them and its impossible to find anything. I tried MP3tag and it finds the metadata for each file in a small batch I started as a test but its unclear how to organise them into album folders ( and the Help isnt available on my browser, it says ) Was there any resolution to the previous entries on this thread as to the best way to do this? So far I have only invested waiting time rather than anything else, and I still have the data intact in the original library, but it does seem tantalisingly possible to turn this hard drives worth of music into a properly indexed library ?

 

Ironically the Kenwood doesnt recognise FLAC files converted from AIFF for some reason and is a bit iffy with directly downloaded FLAC files....a pity because the one file that it does recognise sounds really good at both 16 and 24 bits. I sometimes feel very wistful about the days of physical media when searching meant getting on your knees in front of the shelf unit and dropping it meant having to scrape the dust bunnies from its surface.....any advice gleefully welcomed


Roon NUC I3 w 2500 albums, microRendu to Liberty DAC, Pass DIY Amp class amp, Klipsch RP600 or to Schiit Freya + Gumby MB, Sanders ESL amps and speakers, Mjolnir KGST and Stax L700

Share this post


Link to post
Share on other sites
I have a similar problem as the OP but with a different cause...I used dB Poweramp to convert my library of AIFF files to FLAC so that I could play them in a Kenwood car head unit...the conversion went fine ( but took several days for 2000 CDs ) but all the files ended up as individual FLAC files not in folders so the Kenwood wont recognise them and its impossible to find anything. I tried MP3tag and it finds the metadata for each file in a small batch I started as a test but its unclear how to organise them into album folders ( and the Help isnt available on my browser, it says ) Was there any resolution to the previous entries on this thread as to the best way to do this? So far I have only invested waiting time rather than anything else, and I still have the data intact in the original library, but it does seem tantalisingly possible to turn this hard drives worth of music into a properly indexed library ?

 

Ironically the Kenwood doesnt recognise FLAC files converted from AIFF for some reason and is a bit iffy with directly downloaded FLAC files....a pity because the one file that it does recognise sounds really good at both 16 and 24 bits. I sometimes feel very wistful about the days of physical media when searching meant getting on your knees in front of the shelf unit and dropping it meant having to scrape the dust bunnies from its surface.....any advice gleefully welcomed

 

MP3Tag has now done its magic o the files and named them properly, and they play in the Kenwood...only problem is that all the files are in one large folder play as a kind of comic shuffle. As all the files now have artist and album names, it should be easy to group them in artist folders and album sub-folders right? On a Mac so cant use iTunes with FLAC files....anyone know a way to do this?


Roon NUC I3 w 2500 albums, microRendu to Liberty DAC, Pass DIY Amp class amp, Klipsch RP600 or to Schiit Freya + Gumby MB, Sanders ESL amps and speakers, Mjolnir KGST and Stax L700

Share this post


Link to post
Share on other sites

tl;dr but foobar can do most any retagging you want.

 

But if the files have ID3 tags you can use Foobar's file operations -> move to or copy to. You would have to get a windows machine (VM/parallels is OK) to do it.

 

Set the Destination folder to your *new* root folder and file name pattern to something like:

%album artist%\%date% - %album%\%tracknumber% - %title%

 

That should do what you want.

Share this post


Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
Sign in to follow this  

×
×
  • Create New...