Jamie Garroch (MVP)
asked on
Trouble with quoted form of path in cURL with AppleScript
This works:
Warning: Failed to create the file /Users/[username]/Library/ Group
And in both cases, wrapping the full path in single quotes also fails at the same "Group" part of the path, eg:
do shell script "cURL -f http://mydomain/myfile.txt -o ~/Library/'Group Containers'/UBF8T346G9.Office/myFile.txt"
But extending the target path to include a second quoted folder fails:do shell script "cURL -f http://mydomain/myfile.txt -o ~/Library/'Group Containers'/UBF8T346G9.Office/'User Content'/myFile.txt"
It raises an err:Warning: Failed to create the file /Users/[username]/Library/
And in both cases, wrapping the full path in single quotes also fails at the same "Group" part of the path, eg:
do shell script "cURL -f http://mydomain/myfile.txt -o '~/Library/Group Containers/UBF8T346G9.Office/myFile.txt'"
What am I doing wrong?
ASKER
Thanks serialband. I did try that and also without quoting the ~/ part (bash doesn't expand it if quoted). Having tried another space delimited folder name, which worked, I then discovered the issue. The second folder "User Content" is actually "User Content.localized" which I discovered when right-clicking on it and choosing "Info". With the right folder name, single quote formats for the folder space, full folder name and full folder path (except ~/) all work as expected.
ASKER CERTIFIED SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
ASKER
No other correct answer was provided.
Open in new window