tv-renamer icon indicating copy to clipboard operation
tv-renamer copied to clipboard

Strip invalid characters from Episode name

Open elvishp2006 opened this issue 7 years ago • 2 comments

Example:

"./Season 2/PUNCH_Psycho_Pass_2_11.mp4" -> "./Season 2/Psycho Pass - 2x11 - What Color?.mp4"

The "?" is a invalid character for file names or folders.

I'm using "Windows Subsystem for Linux".

elvishp2006 avatar Aug 17 '17 17:08 elvishp2006

The ? character is a valid character for file names and folders in most filesystems. A fix for Windows' broken NTFS file system would be to check if the target directory is on a NTFS file system, and applying a fix for that. Simplest means would be invoking an external stat command on the target directory and parsing it's output. IE: stat -f -c %T TARGET/DIRECTORY

mmstick avatar Aug 17 '17 17:08 mmstick

The result of this command was: UNKNOWN (0x53464846)

elvishp2006 avatar Aug 17 '17 17:08 elvishp2006