I'm using my Pi as a PVR for recording TV programmes. I have installed Samba to share the directory of recordings so it is accessible by a Windows PC which accesses it as \\pi\sharename\directory\filename.
And I've fallen foul of the dreaded problem that Unix file and directory names can contain characters such as ":" which Windows filenames cannot.
The default configuration of Samba is to "mangle" file/directory names to 8.3 DOS names, which yields some legal but utterly unintelligible names But that's sorted by adding a line "mangled names=no" to the definition of the share in /etc/samba/smb.conf (and restarting Samba).
However it doesn't solve the problem of colons and other "unprintable" characters in filenames. Has anyone solved the problem of how to map them to a printable character such as "." while preserving the rest of the name?
An example is a UNIX file/folder "Britain's Ultimate Pilots: Inside the.../Britain's Ultimate Pilots: Inside the...-20181110-1600-BBC TWO HD.ts". The "..." is a "feature" of the listing in the programme guide and can be ignored (long names get shortened by the broadcaster, with the rest of the programme name continuing in the programme description).
Windows sees the directory as Unix lists it, but can't open the directory. Manually changing the ":" to a "." (in Unix) allows you to go into the directory (so the length of the name and the trailing "..." are not a problem). But then the filename in the directory cannot be opened until you make the same change (in Unix) to the filename.
I see in https://www.oreilly.com/openbook/samba/ ... 05_04.html that there is a keyword "mangled map" which can be used for this sort of thing, but I'm not sure how to drive it: they give examples such as "(*.database *.db)" which renames any file which ends ".database" so it is called ".db" when seen by Windows. I thought about "mangled map =(*:* *.*)" but that seems to have no effect.