DaveS
1
In a swift program, I drag a file and process the filename, but discovered if there is a SPACE in the name if barfs
this works
file:///Applications/zoom.us.app
/Applications/zoom.us.app
this doesn’t
file:///Applications/Yahoo%20Mail.app
/Applications/"Yahoo%20Mail.app"
nor does this
file:///Applications/Yahoo%20Mail.app
/Applications/"Yahoo Mail.app"
any ideas?
have you tried escaping "\ "
1 Like
file:///Applications/Yahoo%20Mail.app
/Applications/Yahoo%20Mail.app
removed quotes
DaveS
4
Norm, yeah, that didn’t work either
DaveS
5
"\ " is not a legal escape
DaveS
6
Solved.
- replace %20 with a space…
Before I was attempting to make a folderitem by
appPath = folderitem(path:s)
where s=“/Applications/Yahoo Mail.app”
but what I needed to do was this
appPath = folderitem(path:URL(fileURLWithPath: s))