INTERACT FORUM

Please login or register.

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

Author Topic: Find & Replace - Invalid Change  (Read 3965 times)

tgack

  • Recent member
  • *
  • Posts: 30
Find & Replace - Invalid Change
« on: December 09, 2015, 09:04:58 pm »

I am trying to move from Windows to Mac and have imported my library into the latest MC 21.0.25 for Mac and want to update all the database pointers to the files' new location.

from: D:\iTunes\iTunes Music\Music

to: /Volumes/My Media/iTunes/iTunes Media/Music

From the Rename, Move, & Copy files window I select Update Database to Point to New Location and choose the third checkbox for Find & Replace.  No matter what I try to enter there it always shows "<invalid change>" in the Preview window.

it seems to be a similar error to what is described in the latter posts of this MC Linux thread:
https://yabb.jriver.com/interact/index.php?topic=100098.0

Has anyone else successfully updated the pointer from a Windows path structure to a Mac path structure using Find&Replace?

Logged

blgentry

  • Regular Member
  • Citizen of the Universe
  • *****
  • Posts: 8014
Re: Find & Replace - Invalid Change
« Reply #1 on: December 09, 2015, 09:14:06 pm »

In my experiments Find and Replace doesn't work on backslash to slash conversions at all.  I think anything with a backslash is considered invalid.

I tried several methods.  The only method I had any luck with, was importing the whole library with the wrong paths (D:\blah\blah) and then turning on Auto Import and letting it sort everything out.  Amazingly, Auto Import seemed to find everything correctly and it kept all of the metadata intact.  Even custom fields, play counts, etc.

I wrote up a post on it... ah here it is:

https://yabb.jriver.com/interact/index.php?topic=100749.msg700001#msg700001

You might want to read the rest of that thread as there's some good discussion.  I also talk about how importing a windows library kind of screwed up my installation.  I was able to fix it, but it wasn't fun.  Short version:  Don't restore SETTINGS at all from the windows library.

Good luck.

Brian.
Logged

JimH

  • Administrator
  • Citizen of the Universe
  • *****
  • Posts: 72438
  • Where did I put my teeth?
Re: Find & Replace - Invalid Change
« Reply #2 on: December 09, 2015, 09:27:51 pm »

It might work to do a double back slash if you want to replace a single back slash.  Try a few before you do very many.
Logged

glynor

  • MC Beta Team
  • Citizen of the Universe
  • *****
  • Posts: 19608
Re: Find & Replace - Invalid Change
« Reply #3 on: December 09, 2015, 11:50:51 pm »

It might work to do a double back slash if you want to replace a single back slash.  Try a few before you do very many.

Yeah, you might have to use some escape characters to get it to work. I'm pretty sure I fixed an Imported Library via RMCF before from Windows to Mac with Find & Replace. But it has been a while.

In general, the forward slash in MC is an escape character, so if you want to do a / literal, you need to double it, like http://// (for example).  You might need to do some trickery to get it to work, since it expects forward slashes in the Mac filename, but not backslashes. Maybe escape the backslashes with a forward slash or some nonsense?

Of course, it is also possible that this never worked, or worked in the past, but some "better" (in other ways) filename parsing added to RMCF more recently has broken it.  One thing you could (maybe) do is try the "real" Find & Replace tool instead. This still works on [Filename], if you pick that field, and if all of the selected, current, filename links are broken, it'll act just like RMCF in Update Database Only mode.

That's the way we used to have to do it before there was a Find & Replace template in RMCF. It might be less "smart" about the filename slashes and just do what you tell it to do, so that could be a way to go if you don't just go Brian's route.

EDIT: Another thing I just thought of before I sign off... If you still have the Windows machine, you might be able to use it to make a backup already "fixed" for the Mac. Clone the working Library over to a new one (so you don't mess up the current one). Then, do RMCF on it in Update Only mode, or use Find & Replace, to change the slashes on the cloned Library.  It'll break all the links (turning them into the Mac valid filenames), which is exactly what you want. You might be able to get the forward slash to work there by escaping it with the double slash method, where the Mac reverse the slashes logic might mess you up on the Mac.
Logged
"Some cultures are defined by their relationship to cheese."

Visit me on the Interweb Thingie: http://glynor.com/

glynor

  • MC Beta Team
  • Citizen of the Universe
  • *****
  • Posts: 19608
Re: Find & Replace - Invalid Change
« Reply #4 on: December 09, 2015, 11:51:35 pm »

Amazingly, Auto Import seemed to find everything correctly and it kept all of the metadata intact.  Even custom fields, play counts, etc.

That would still break any manual Playlists, though, right? Because the File ID would change...
Logged
"Some cultures are defined by their relationship to cheese."

Visit me on the Interweb Thingie: http://glynor.com/

blgentry

  • Regular Member
  • Citizen of the Universe
  • *****
  • Posts: 8014
Re: Find & Replace - Invalid Change
« Reply #5 on: December 10, 2015, 08:40:47 am »

That would still break any manual Playlists, though, right? Because the File ID would change...

No, they are preserved.  Auto Import fixes all of the references.

All of the stuff you and Jim wrote doesn't work.  I just tried it.  RM&C refuses to touch any file name with a backslash in it.  It says invalid change before ANYTHING is entered into either the find or replace boxes.  You can't even change a V to a Z (for example).  No amount of \\ /\ // makes any difference.  It simply won't accept the names with backslashes in them.

The "real" Find and Replace tool won't show me anything other than 4 or 5 fields.  I can't find any controls to show more fields and filename or any of it's variants isn't shown.  I could be missing something with the F&R tool.

Brian.
Logged

glynor

  • MC Beta Team
  • Citizen of the Universe
  • *****
  • Posts: 19608
Re: Find & Replace - Invalid Change
« Reply #6 on: December 10, 2015, 01:33:03 pm »

The "real" Find and Replace tool won't show me anything other than 4 or 5 fields.  I can't find any controls to show more fields and filename or any of it's variants isn't shown.  I could be missing something with the F&R tool.

You're right. Mine doesn't only show 4-5, but it does show only a limited set (and not including [Filename]).  Hmmm.
Logged
"Some cultures are defined by their relationship to cheese."

Visit me on the Interweb Thingie: http://glynor.com/

glynor

  • MC Beta Team
  • Citizen of the Universe
  • *****
  • Posts: 19608
Re: Find & Replace - Invalid Change
« Reply #7 on: December 10, 2015, 01:34:29 pm »

No, they are preserved.  Auto Import fixes all of the references.

You're right, of course. Fix Broken Links works by "undeleting" the existing file entries and fixing the [Filename] flag, which means the File ID does not change (which preserves everything). As long as the files match and are in the same location (just obviously on the new filesystem setup) then this should work fine.
Logged
"Some cultures are defined by their relationship to cheese."

Visit me on the Interweb Thingie: http://glynor.com/

tgack

  • Recent member
  • *
  • Posts: 30
Re: Find & Replace - Invalid Change
« Reply #8 on: December 10, 2015, 07:27:35 pm »

Thanks for all of the advice.  My concern with the Auto-Import Fix Broken Links is I had read that may reset the Date Imported field which is a relatively important field for me with some of my views (ensures I can quickly find my latest music).  I thought maybe I could copy that field to a custom field and then recopy it back over once everything was setup after the auto-import, but couldn't figure out how to do that with the non-editable field.

Since I still had access to the source machine, here's the approach I settled on after some trial and error which seemed to work OK.

(1) Run Find & Replace on Windows machine and Update Database to reset all root level drives in the file paths to a Mac-compatible format (example:  from D:\ to  /Volumes/My Media/)
(2) Run Find & Replace a second time on Windows machine and Update Database to reset all remaining \ to /
* For steps 1 & 2, it is irrelevant if the resulting path is a true physical path- I am intentionally creating a broken link and I just needed to get all paths into a Mac format that can be adjusted later in Step 5
(3) Backup library on Windows machine and move the file onto my Mac
(4) Restore the library file into to a new Mac library
(5) Use Find & Replace on Mac machine and Update Database to reset the paths to their new correct location on the Mac



Logged
Pages: [1]   Go Up