in reply to Escape blank spaces

That depends on whether a shell will interpret the command line that includes the file name. If it will, quotemeta should do it, along with handling lots of other gotchas.

$ perl -e'$_ = "foo bar baz"; print quotemeta, $/'
foo\ bar\ baz
$ 

If there is no shell interpretation, you probably don't need to escape them.

After Compline,
Zaxo