Hey, I’m trying to write a script that takes an input file and a destination and then runs it through a shell script that unpacks .lit ebooks so I can read them on my mac. I’d eventually like to make it so that the script can take a whole folder of .lit files and pass them through all at once. Thus far, the code goes like this:
set filePath to quoted form of the POSIX path of ((choose file with prompt "Please select the .lit file you would like to decompress.") as alias) set decompressionPath to quoted form of the POSIX path of ((choose folder with prompt "Please create and select the folder you wish to decompress into.") as alias) do shell script "/bin/bash clit " & filePath & " " & decompressionPath
The problem lies in the way that I’m currently handling the path of the input file. There are spaces in the file name which the script is just passing on without adding in slashes. Any help would be greatly appreciated.
Model: pbook 12"
Browser: Safari 419.3
Operating System: Mac OS X (10.4)