Quotation marks

I have an Applescript in which I am using a shell script command. The problem I have run into involves use of quotations marks.

This script:


set image_title to "Pictures of river"
set image_file to "'river'.jpg"
set command to ¬
	"exiftool -title=\"" & image_title & "\" " & ¬
	"\"" & image_file & "\""
display dialog command as string

will result in the following display:

exiftool -title=“Pictures of river” “‘river’.jpg”

The primary limitation of this is I cannot use any title or filename that has the quotation mark in it. To use this, results in an error message (the script is taking the name of photos in iPhoto and writing info to the EXIF metadata for the file).

Is it possible to get around this limitation, in order to be able to use quotation marks in file names or titles?

Hi,

try quoted form of


set image_title to "Pictures of river"
set image_file to "'river'.jpg"
set command to "exiftool -title=" & quoted form of image_title & space & quoted form of image_file
display dialog command as string

Thanks! Would that allow me to use not only quotation marks but also single quotes (i.e., apostrophe) and other special symbols?

quoted form of considers all kinds of quotation and special characters

Gracias!

de nada