I'm stuck on figuring out a way to take text of a file name and converting it into a string that can be usable in commands.
I would like to take a file name (for example: [foo] bar - foo.mkv) and add backslashes to spaces, square brackets, and any other characters (for example \[foo\]\ bar\ -\ foo.mkv) so that they are usable in a command such as mv.
Thank you for helping me.