I know this has been covered here and there, but I have a long standing problem and I've finally reached my wits end and have not yet found a solution.
How do I pass a file name with a variable number of spaces to a shell object so that I can, for example, copy to a folder with cp using absolute path names? So far I've been using sprintf's and regexp's but it's left me with a headache.
Shell needs single backslashes in order to recognize file names with spaces but the moment I try to do something like cp /Applications/my spacy file.mov /Applications/myfile/my spacy file.mov Max surrounds it with quotes. I know why this happens, but is there any way to disable it in certain instances or is there any way around it.
Normally if there's a set number of spaces I can use sprintf to do something like [sprintf %s %s %s] but if there's only two spaces or more than two it leaves me with a problem. Example of what I'm trying to do below.