Become a MacRumors Supporter for $50/year with no ads, ability to filter front page stories, and private forums.

rupam.db

macrumors member
Original poster
May 29, 2012
72
0
I'm trying to write an :apple:script for using AtomicParsley

Code:
set [B]atomicparsley_path[/B] to POSIX path of (path to resource "AtomicParsley")
set [B]file_path[/B] to POSIX path of (choose file)
.
.
.
.

If I choose a file such as 01 Apple.txt, file_path takes "/Users/home_folder/Some Folder/sub folder/01 Apple.txt".

How to escape the spaces in file path?
AtomicParsley doesn't takes the file path if it is quoted...it works only when the spaces are escaped
Or is it possible to create a function that replace the " " (space) with "\ " (backslashed space) ? so that file_path gets this string "/Users/home_folder/Some\ Folder/sub\ folder/01\ Apple.txt"

Please help :(
 
Last edited:
Register on MacRumors! This sidebar will go away, and you'll see fewer ads.