I recently ripped my 600+ album collection to FLAC, and up until now i never noticed there was something wrong with the files. See the files themselves look normal viewing them from within Mint. And they all play fine.
Everything looks fine here right. But i noticed when trying to actually share these files with my Windows machine that they would not play, nor would they copy. Windows gave me an error saying the filenames where too long. And i knew that was BS because they are clearly not. So this sent me down a spiral thinking the issue was samba.
Turns out when i browse the album folders each of the FLAC files have a ? before the end of them.
If i go into properties this ugly thing is hidden in there instead of the ? from the console.
And this is where my frustration really started. I found a console command that actually does solve part of my problem.
When entered in the album folder it strips away the ? mark, but leaves a space between the song name and the file extension.
So way too long story short, is there a better way of removing the ? from all my FLAC files in one swoop while also not making a space where the symbol would be?
Or do i really have to manually go through each album do the command and then manually do a backspace on each file. I really hope some of you are way better at these things then i am.
UPDATE
First of all thank you to all the people who gave advice on how to fix this.
I solved my problem by running this:
find -name $'*\n*' -exec rename $'s|\n||g' '{}' \;
It found every file in my music folder with the newline symbol and also manages to insert nothing so that the file name now ends in blank.flac instead of a blank(space).flac.
ls
saying "I don't know how to print this character". I'd usebasename
, strip the last character, and tack the extension back on it. – DopeGhoti May 24 '18 at 16:48\012
or/n
). You can see that from the GUI "strange symbol". Repeat yourtr
attempt but with that instead of a literal question mark. – roaima May 24 '18 at 22:44