interesting idea, here the results with a file named "copy of pack.tar.gz":
1. name only
.. as expected: the spaces are taken as delimiters.
2. #DQUOTE$ + name + #DQUOTE$ (or Chr(34) instead of #DQUOTE$)
so this SHOULD work, however when i do the same with a terminal log, i get "[...]/copy: Cannot open: No such file or directory" which means the space is taken as a delimiter. Also, quotes are not printed into out.txt as I expected.
3. ReplaceString(name, " ", "\ ")
... which is obviously nonsense. terminal output is: "[...]/copy\\: Cannot open: No such file or directory" which means my single backslash is escaped, rendering it a double backslash.
4. #DQUOTE$ + ReplaceString(name, " ", "\ ") + #DQUOTE$
... which again SHOULD work, but the terminal output is again "[...]/copy\\" -> escaped backslash
5. #DQUOTE$ + Chr(34) + name + Chr(34) + #DQUOTE$
now this is the weirdest of all... both double quotes at the end instead of where i placed them in the code, and the name is broken up into 3 arguments.
5 shows that there is some serious argument pre-/post-processing going on that I have little influence on. Any idea on how to circumvent it?