INTERACT FORUM

More => Old Versions => JRiver Media Center 27 for Mac => Topic started by: bMinor on January 05, 2021, 10:13:26 am

Title: Find & Replace
Post by: bMinor on January 05, 2021, 10:13:26 am
I'm still on MC25 and this might not apply to the latest version but I thought i'd post it here anyways in case it does apply.

Is there a way to make 'Find & Replace' within the library tools accept the characters ?, ", and /  when trying to just change the directory?
Find & Replace in MC25 fails to recognize any filename or path (eg folders) containing these characters. It seems like a Windows thing but should not happen on a Mac were these characters can be used anywhere.

examples:
a path like this one is not accepted because of the ? in the filename...:
Volumes/HD2/Music/Beatles - White Album (1968)/15 - Why Don't We Do It In The Road?

the / between the years prevents anything following from being read:
Volumes/HD2/Music/Beatles - Greatest Hits (1962/1968)/...

the " prevents the file being read:
Volumes/HD2/Music/Beatles - Please Please Me [7" Single) (1962)/01 - Please Please Me

The only thing that changed from the original files and locations is the path from HD1 to HD2. Everything else
stayed the same.

(I also noticed that filenames with a leading blank space don't work either)

Yes, library backups are a life saver.

Sorry for posting in the wrong place if the above does not apply anymore in newer versions.
Title: Re: Find & Replace
Post by: HaWi on January 05, 2021, 10:17:30 am
I believe that in the expression you use to define the search string you have to use an "escape" character (here the escape character is /) before the special character. So to find ? you use /?, to find / it is //
Good luck!
Title: Re: Find & Replace
Post by: bMinor on January 05, 2021, 10:46:38 am
Hi HaWai,
thanks for replying.
Sorry for being unclear in my 1st post. It's the 'Find & Replace' within the library tool 'Rename, Move & Copy'.
I have 2 identical folders (the original on HD1 (which is dying) and a copy on HD2).
All I want to do is using 'Find & Replace' to change the path from 'Volumes/HD1/Music/...'  to 'Volumes/HD2/Music/...
It does not work with files and/or paths containing any of those characters (", ?, /), all others work.
how?
Title: Re: Find & Replace
Post by: HaWi on January 05, 2021, 01:22:17 pm
Can you make a screenshot after pressing F6 to show how you have set it up? Is the Find & Replace checked or unchecked? If you just want to change the path I would let that unchecked.
Normally if you just replace the path /Volumes/HD1/... with /Volumes/HD2/...  that should just point to HD2 and you should see everything at HD2.
Paths, I believe in any OS (Windows, Mac, Linux cannot contain ?/ is interpreted as a folder level. I believe " should be OK.
File names can contain ? and " but also not / because that as well, would create another folder level.
If the R,M&C cannot find files with " or ? that may point to encoding differences. I have had to replace special characters in file names with "manually" generated ones, even though they "looked" exactly the same.
Title: Re: Find & Replace
Post by: wer on January 05, 2021, 01:26:17 pm
Do you have the check box immediately to the left of the words "Find and Replace" checked? Because if you don't, you have that module disabled.
Title: Re: Find & Replace
Post by: bMinor on January 06, 2021, 03:00:35 pm
thank you both for your input.
MC can read any character the 1st time and import the file no matter what it's called it seems. however, file or pathnames cannot contain any of these four characters  ", /, ?,*  if you plan to eventually move the directory using MC's 'find & replace' in the library tools. Also, the filename is not being read if it starts with a 'space'.
Simply just re-importing the moved files in question works but you'd be in the same boat if you need to change directory again after that. I bit the bullet and started altering the file names/paths manually...hey I'm at the letter E. In a couple of days I should be done. Thank god for retirement... :)
Title: Re: Find & Replace
Post by: zybex on January 06, 2021, 03:10:20 pm
Linux doesn't allow '/' in filenames, as that is the directory separator char. It does allow '?' and '*' and a few others which are forbidden in Windows. So you might have some files with those chars, but that's not advisable for compatibility reasons. Perhaps MC doesn't handle them correctly due to common code with the Windows version.

If you have the files on a Linux filesystem such as EXT2/3 (or a NAS, for instance), but you're using MC for Windows to manage those files, you might run into problems.

You should avoid other chars in the filenames for compatibility. Here's a list:
https://docs.microsoft.com/en-us/windows/win32/fileio/naming-a-file#naming-conventions

Quote
The following reserved characters:
< (less than)
> (greater than)
: (colon)
" (double quote)
/ (forward slash)
\ (backslash)
| (vertical bar or pipe)
? (question mark)
* (asterisk)
Title: Re: Find & Replace
Post by: HaWi on January 07, 2021, 09:38:09 am
Linux doesn't allow '/' in filenames, as that is the directory separator char. It does allow '?' and '*' and a few others which are forbidden in Windows. So you might have some files with those chars, but that's not advisable for compatibility reasons. Perhaps MC doesn't handle them correctly due to common code with the Windows version.

If you have the files on a Linux filesystem such as EXT2/3 (or a NAS, for instance), but you're using MC for Windows to manage those files, you might run into problems.

You should avoid other chars in the filenames for compatibility. Here's a list:
https://docs.microsoft.com/en-us/windows/win32/fileio/naming-a-file#naming-conventions
The reason files that contain special characters are not found after saving them is that MC replaces these characters with a permissible one. E.g. : is replaced with _. I am not entirely sure right off the top of my head but it maybe that all special characters are replaced by _.
Title: Re: Find & Replace
Post by: zybex on January 07, 2021, 10:02:41 am
MC shouldn't import them in the first place. No point in importing a file if it can't then work with it. Perhaps MC can warn the user and ask permission to rename the file itself.
Title: Re: Find & Replace
Post by: bMinor on January 12, 2021, 08:58:58 am
And the best answer is:

MC shouldn't import them in the first place. No point in importing a file if it can't then work with it. Perhaps MC can warn the user and ask permission to rename the file itself.

Title: Re: Find & Replace
Post by: HaWi on January 12, 2021, 01:18:30 pm
Indeed, it would be really nice if the warning included information about which characters are problematic and if they are going to be automatically replaced and by what alternative character.