INTERACT FORUM

Please login or register.

Login with username, password and session length
Advanced search  
Pages: [1]   Go Down

Author Topic: Renaming files affected by AFP to SMB conversion  (Read 376 times)

couchjr

  • World Citizen
  • ***
  • Posts: 121
Renaming files affected by AFP to SMB conversion
« on: February 13, 2023, 06:16:13 pm »

Wise and generous ones:

I run MC on a Mac Mini as a music player. Media files are stored on a Synology NAS that used to mount shared folders as volumes on my Mac desktop via AFP over TCP, and now mounts them there via SMB over TCP (using the "Connect to server" command). The good news is that the buffering dropouts that plagued me for years in MC are gone.

The bad news is that the characters " and ? are not supported by SMB, and were by AFP. I discovered this by accident, when I clicked on a familiar track in JRemote and nothing happened. Checking the info view in JRemote, I saw that the filenames had square "unknown character" symbols where either double quotes or question marks should be. Same is true in the Standard View in the desktop version of MC. These characters occur in operas (where aria incipits were included in the "metadata" filenames downloaded with the album) and in song filenames that were tagged to include question marks from the title, etc.

These represent a small minority of my tracks, but the whole collection is above 50K tracks. So I need a power tool to deal with the issue. Single quotes are allowed in SMB, and I could happily lose the question marks in filenames.

I could dismount the shared volumes and temporarily remount them using AFP over TCP. Presumably that would allow me (and MC library tools) to see all the characters in the strings. At that point, here are my thoughts/questions:

Presumably I could run "Find & Replace" in "Rename, Move, and Copy Files" to just replace all double quotes with single quotes in filenames in MC's library. This presumably would leave all other tag fields untouched. And then repeat, replacing question marks with nothing.

      Query 1: How do I select an entire shared folder/volume in RMCF?

      Query 2: I don't see a setting to make the "Find & Replace" changes apply both to the media files on
                   the mounted NAS and to the MC library. Is there a way to do that in MC?

      Query 3: If I need to call Synology support to see if there's a find-and-replace tool in the File Station
                    app that would let me edit the filenames on the NAS to match those in the MC library, am I
                    correct that I should change the MC library ones first, and then do the NAS, and then
                    dismount and remount the shared folders/volumes and restart MC to sync?

If there's an easier way to solve this, I'm all ears. Many thanks in advance for your library management expertise. The RMCF interface is a little ambiguous to me. Unintended consequences strike again . . . .
               
Logged

JimH

  • Administrator
  • Citizen of the Universe
  • *****
  • Posts: 71365
  • Where did I put my teeth?
Re: Renaming files affected by AFP to SMB conversion
« Reply #1 on: February 13, 2023, 07:05:55 pm »

Experiment a little with just a few files to learn.

Find and Replace will probably work, but try to copy the square symbol using ctrl-c and paste it where you want using ctrl-v.

You can isolate a few files with the search window in the upper right corner.  Search for any character or string, then select the results below before you do the edit.
Logged

couchjr

  • World Citizen
  • ***
  • Posts: 121
Re: Renaming files affected by AFP to SMB conversion
« Reply #2 on: February 13, 2023, 08:08:10 pm »

Many thanks, Jim. I tried this with just a few albums on my MacBook. Using the search in the upper right on the Standard View screen, I copied a compound diacritical (accent grave) into the query field, which pulled up several files (from Debussy) as results. I selected two to experiment on, pasting that same compound diacritical character in the "Find what" field in the RMCF pane and a single quote in the "Replace with" field. When I clicked "Save" the correct substitution occurred. I checked the relevant two media files in the MacBook finder window, and the substitution had been made there too. So am I right in thinking that the single operation affects BOTH the media files in question AND the MC library's database? If so, that's great news.

I will now test (via Splashtop on an iPad, since the Mini is headless) whether I can successfully copy and paste the square symbol into the "Find what" field. If I'm lucky, even though the same square symbol displays for both double quotes and question marks, the one I copy and paste will only identify one of those characters, and I can replace the files for each separately. If that square symbol finds both " and ?, then I'll replace them all with single quotes, since there are many fewer question marks in the affected filenames, and replacing them with a single quote won't matter to the human-readable tagging anyway, as long as the media filenames match the MC library.

If this method works in a test, I can mount all the volumes and run the search on the entire library at one time and do the edit on all the affected files in either one or two passes.

Please confirm, and thanks again.

Logged

JimH

  • Administrator
  • Citizen of the Universe
  • *****
  • Posts: 71365
  • Where did I put my teeth?
Re: Renaming files affected by AFP to SMB conversion
« Reply #3 on: February 13, 2023, 09:01:29 pm »

You can move changes from the database to the files or vice versa with MC's tools called

Update tags from library
and
Update Library from tags

Again, try a few.
Logged

couchjr

  • World Citizen
  • ***
  • Posts: 121
Re: Renaming files affected by AFP to SMB conversion
« Reply #4 on: February 13, 2023, 11:33:56 pm »

I'm very familiar with those tools. But I've never used them from the RMCF pane before, only when tagging individual albums.

When filenames appeared in the search results area (which displays values for database tags including "filename") from a query on the compound character (accent grave e), and I renamed them using RMCF Find & Replace, the Preview window there appeared to display media filenames and the changes showed up in the media files (as verified in the Finder folder for that album). Then when I canceled the search results window and checked the value for the database tag "filename" for the relevant files in that album, the renaming showed up there too, and the tracks play. So it appears that the RMCF Find & Replace is updating both the media filename and the filename tag in the database. But maybe it's not writing the updated "filename" tag value into the media file where it will be durable and portable.

In that case, it sounds as if you're suggesting I run "Update tags from library" after renaming the media files using Find & Replace. I'll do that. Can't hurt, if the Standard View is showing the correct value for the "filename tag."

Thanks!
Logged

HaWi

  • Citizen of the Universe
  • *****
  • Posts: 905
Re: Renaming files affected by AFP to SMB conversion
« Reply #5 on: February 14, 2023, 09:18:10 am »

FWIW, I would also deactivate AFP on the NAS and use SMB/CIFS. It's been deprecated by Apple for a while. I store my media on a Synology, too and while I had to use NFS for a while, the recent OS updates seemed to have made SMB pretty stable again. I have been using SMB for about a year now and it's not given me any issues.
Logged
rPi5/8GB, Debian 12 Bookworm on SSD | JRMark (32.0.36 64 bit): 2699
MacBookPro (2013), 2.6 GHz Quad-Core Intel Core i7, MacOS 11.7.17 | JRMark (32.0.38 64 bit): 3764
Mac Studio M2 Max, 64GB, 1TB SSD, macOS Sonoma 14.4.1 | JRMark (32.0.38 64 bit): 9235
Docker Container (shiomax) DS1819+ | JRMark (32.0.36 64 bit): 1430
JRemote 3.43
MO 4Media 1.5.7 | Marantz SR7007 (RSL 5.1) HDMI to MacBookPro

couchjr

  • World Citizen
  • ***
  • Posts: 121
Re: Renaming files affected by AFP to SMB conversion
« Reply #6 on: February 14, 2023, 02:34:17 pm »

@HaWi: Thanks - That's what I did (connect using SMB instead of AFP). That's what created the problem. Double quotes and question marks are illegal characters for SMB, but AFP recognizes them. My question was how to replace all the double quotes and question marks in filenames so I could keep using SMB, which I like better in all other respects.
Logged
Pages: [1]   Go Up