So I am working on a couple of scripts and I’m having issues with folder names with spaces.
Lets say my Script is in the following folder:
/Users/daniel/Documents/Clients/Joe Bloggs
I have worked around this by manually typing in the url path up to the parent, I then grab the parent and add quotes around it and add it to the url like so:
/Users/daniel/Documents/Clients/‘Joe Bloggs’
Although I use ‘quoted form’ to do that part.
This is working fine but if I ever decide to put ‘Joe Bloggs’ into another directory it would throw everything out. If the other directly looked anything like this:
/Users/daniel/My Documents/New Clients/Joe Bloggs
I would have a major task on my hands.
Is there anyway I can get automatically add quotes around a folder name if it has spaces or all folder names in the url?
I mean like this:
/Users/daniel/‘My Documents’/‘New Clients’/‘Joe Bloggs’
or
/‘Users’/‘daniel’/‘My Documents’/‘New Clients’/‘Joe Bloggs’