INTERACT FORUM

Please login or register.

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

Author Topic: Make File Renamer Accept output of Field as full directory?  (Read 425 times)

Doof

  • MC Beta Team
  • Citizen of the Universe
  • *****
  • Posts: 5908
  • Farm Animal Stupid

I've been working on an expression to dynamically determine where all of my file types should go and I'm trying to use the output from that to to tell the Rename, Move, & Copy Files tool where to move files to. But it's replacing all \ chars with _ and breaking the intended directory structure. I've tried using the Find/Replace option to replace _ with \ again, but since _ is MC's goto replacement for any/all invalid characters, it ends up breaking directories that might otherwise have had a _ char in it to replace something else, turning it into another directory. For example, using the a field that outputs "\Music\(Multiple Artists)\Movie: The Soundtrack\" I would end up with either "_Music_(Multiple Artists)_Movie_ The Soundtrack_" or "\Music\(Multiple Artists)\Movie\The Soundtrack\", neither which is correct.

Is there a better way to get the Rename, Move, & Copy Files tool to use the output of a single expression-based field as a literal path value to use?
Logged

wer

  • Citizen of the Universe
  • *****
  • Posts: 2640
Re: Make File Renamer Accept output of Field as full directory?
« Reply #1 on: May 22, 2020, 08:09:35 pm »

Have you tried quoting the backslashes?
/\Music/\(Multiple...
Logged

Doof

  • MC Beta Team
  • Citizen of the Universe
  • *****
  • Posts: 5908
  • Farm Animal Stupid
Re: Make File Renamer Accept output of Field as full directory?
« Reply #2 on: May 22, 2020, 10:21:12 pm »

Well, I thought you might be on to something, but using "/\Music/\(Multiple Artists)" left me with "/_Music/_(Multiple Artists)". I tried escaping numerous levels down "//\" and "///\" but none of them worked.

It did give me an idea, though. I decided on my own delimiter to represent backslashes, in this case "……" and I do a find/replace on the directory name to replace "\" with that new delimiter, one I know won't ever come up naturally, and then have the Rename tool's Find/Replace just swap the "……" delimiter back out for the original "\". Seems to be working well, now, thanks!
Logged
Pages: [1]   Go Up