Naming episodes with "And" instead of "&"

Sonarr version 3.0.6.1196:
Windows 2012:
Debug logs:

This isn’t really a bug. Is there anyway to have Sonarr name episodes with “&” and replace it with “And” instead? I know “&” is supported character but windows doesn’t really play well with files that have the “&” character in them. Batch files tend to not work correctly without a decent amount of alteration. “&” also tends to be a protected character in Linux systems so same problem.
Any way to do this?

No.

and & is only an issue if user’s don’t properly escape it, it’s my understanding & is a valid file name character on all OSes. Any issues will be user caused for not properly escaping the character in a console or script.

1 Like

I dropped Windows almost 4 years back but I still help a lot of people with their Windows system and in it and in Linux I have never seen either OS have a issue with &.

I know this really isn’t the place since this is a windows batch issue. I am trying to use the CONNECT option to run a script on all imports. The beginning of my script looks like:
@setlocal EnableDelayedExpansion
@set TARGET="%~d1%~p1%~n1%~x1"

@set TARGETDRIVE=%~d1
@set TARGETPATH=%~p1
@set TARGETNAME="%~n1"
@set TARGETEXTENSION=%~x1
Unfortunately anything referencing TARGETNAME or TARGET for that matter, fails if the name part of the file has an “&” in it. Been at this for quite awhile with no luck.

https://www.robvanderwoude.com/escapechars.php

from a 5s google

Yeah. I know how to google also. Doesn’t explain how to deal with filenames with special characters in them though, especially when the filename may or may not have a special character. There is quite a difference between a filename with special characters in it and a simple echo command.

Your google-fu is weak, old man :wink:

“batch file ampersand in filename” took me here: https://stackoverflow.com/questions/33351455/batch-file-deal-with-ampersand-in-folder-name

File name, folder name, same difference… use quotes and delayedexpansion.
Also consider using anything other than batchfiles. PowerShell is the preferred scripting language for a while now in Windows. VBScript is also way easier to deal with file operations.

1 Like

This topic was automatically closed 60 days after the last reply. New replies are no longer allowed.