Archiving to Synology NAS, subdirectory names ending in a space.

sceptic

Forum Supporter
This may well apply to other devices as well, but one thing to look out for are subdirectory names ending in a space which the Humax generates on occasions, that do not display correctly when accessed via Windows,. If you remove the space character at the end then they display correctly in Windows. I initially thought the filesystem was corrupt! :eek:

Synology Recordings Share.png
 
do not display correctly
I think they could be displaying correctly - what you are seeing is the short-form (8.3) representation. Why a trailing space provokes Windows into using the short representation is another matter. and you might well consider that undesired, but I suspect it is "normal".
 
what you are seeing is the short-form (8.3)
Yes indeed. No idea why Windows does that for the Synology but not for the PVR.

Should be a fairly simple script to detect and strip trailing spaces
Agreed. It would be nice to have something on the PVR to strip out any dodgy characters. Mind you I would never have expected a trailing space to do that in the first place...!
 
I think they could be displaying correctly - what you are seeing is the short-form (8.3) representation. Why a trailing space provokes Windows into using the short representation is another matter. and you might well consider that undesired, but I suspect it is "normal".
Yes indeed. No idea why Windows does that for the Synology but not for the PVR.
...
I wonder if the 8.3 interpretation was due to the long filename support Microsoft added decades ago.
Would that depend on the filesystem? Modern filesystems like FAT32, NTFS, Ext2 etc support long filenames natively so maybe Windows thinks the NAS is using an old filesystem?
Ignore me - looks like you're right about trailing spaces
https://kb.synology.com/en-global/DSM/tutorial/file_or_folder_name_displayed_as_12HWA0_8#VQb7RGGosK
 
Last edited:
@bottletop Thanks for the confirmation. One other thing to note I have been archiving off the PVR to Synology for years and have only observed this for recordings archived relatively recently. My older archived recordings do not have this issue, so it looks like something on the PVR started adding a trailing space to some of the directories at some point...
 
So from https://stackoverflow.com/questions...-with-trailing-spaces-at-the-end-of-each-name

Try WebIF/diagnotics/webshell - cli
We can use find "/media/My Video/" -name "* " -type d or just find "/media/My Video/" -name "* " to check current directory and sub directories.

So on my HDR, I introduce directories with trailing space
Code:
cd "/media/My Video/"                                                                     
mkdir "spaces1 " "spaces2  " "spaces-none"
I get this, because HDR produces 29 character directory names and sometimes split names produce trailing space (from New: Law & Order: Special Victims Unit)
Code:
find . -name "* "
./spaces1
./spaces2
./New_ Law & Order_ Special___
You can also try ls -Q to check current directory.
Code:
ls  -Q *" "
"New_ Law & Order_ Special___ ":
"New_ Law & Order_ Special____20220217_2101.hmt"
"New_ Law & Order_ Special____20220217_2101.nts"
"New_ Law & Order_ Special____20220217_2101.thm"
"New_ Law & Order_ Special____20220217_2101.ts"

"spaces1 ":

"spaces2  ":
That is the only recent one on my drive. Maybe you've introduced the trailing space by mistake? Eg odd mistake/rule in sweeper?
 
Last edited:
so it looks like something on the PVR started adding a trailing space to some of the directories at some point...
Maybe that's down to the broadcaster's metadata?

No idea why Windows does that for the Synology but not for the PVR.
When did you say this is a Synology thing not a HDR-FOX thing? If it's not a HDR thing why is this even here?

I note Synology explain how to avoid the problem without explaining why it's happening!
 
Try WebIF/diagnotics/webshell - cli
Thanks that found another 14 directories not yet archived.

I get this, because HDR produces 29 character directory names and sometimes split names produce trailing space (from Law & Order: Special Victims Unit)
I have never understood how the HDR names directories, but it can produce longer directory names than that like "Brainwashed to Kill in Hollywood ", which is one of the directories that ends in a space on my PVR. Maybe its just as simple as if whatever character it deems to be the last character of the directory name happens to fall on a space character in the original filename then the directory name ends in a space. When that happens it really should be changing that space character to an underscore.

That is the only recent one on my drive. Maybe you've introduced the trailing space by mistake? Eg odd mistake/rule in sweeper?
I do use sweeper but only for a couple of rules and nothing that would account for this. I am probably seeing it more than you as I do record a lot
 
I note Synology explain how to avoid the problem without explaining why it's happening!
They do link to Microsoft which suggests its a Windows issue, see HERE

When did you say this is a Synology thing not a HDR-FOX thing? If it's not a HDR thing why is this even here?

I made the distinction between Synology and Humax as in explorer directory names are shown as 8.3 on a Synology SMB share in explorer but they are displayed correctly on a SMB share to the HDR for some reason, Which is a bit weird! It is still an HDR thing as its responsible for generating them in that format in the first place. Which is why I created this thread for anyone else who might be archiving...
 
If it helps, this is the full result of mine (after removing the test directories)
Code:
HDR# find "/media/My Video/" -name "* "
/media/My Video/50-Not_watched_KEEP/Secrets Of The McVitie's Factory 
/media/My Video/50-Not_watched_KEEP/How To Get A Good Night's Sleep 
/media/My Video/50-Not_watched_KEEP/Greatest Ever Celebrity Wind Ups 
/media/My Video/New_ Law & Order_ Special___
50-Not_watched_KEEP is a sub directory I place there for stuff I haven't watched.
I get this, because HDR produces 29 character directory names and sometimes split names produce trailing space (from New: Law & Order: Special Victims Unit)
My mistake - it looks like the directory name isn't limited to 29/30 characters.
 
Last edited:
Back
Top