LrTasks.execute and more than 1 pair of quotes

  • Thread starter Thread starter hoshisato
  • Start date Start date
Status
Not open for further replies.
H

hoshisato

Guest
Hi, I'm playing around building an export provider plugin and get the weird situation that LrTasks.execute runs into an error if both the name of the executable and the name of the target have quotes around it, the command fails, but if I have only one set the command works.

For example, if I pass this string to LrTasks.execute it fails:
"C:\Program Files\My Tool\mytool.exe" -option 22 "C:\Users\Hoshisato\Pictures\2''8\2''8-11-'2\JPEG\be3A7AC.jpg"

But this works:
"C:\Program Files\My Tool\mytool.exe" -option 22 C:\Users\Hoshisato\Pictures\2''8\2''8-11-'2\JPEG\be3A7AC.jpg

Still, if the target name contains spaces, it'll fail of course. Why would LrTasks.execute behave like this? Any known bypass for this problem?
 
Welcome, hoshisato.

I moved thread to the Lightroom Plugin Discussion forum which should be a better place for it.

Meanwhile, one of our Plug-in developers maybe by in a while to try to help you.

Don
 
Hi Hoshisato, it should work if you put an additional set of quotes around the complete command to execute.

For example:
""C:\Program Files\My Tool\mytool.exe" -option 22 "C:\Users\Hoshisato\Pictures\2''8\2''8-11-'2\JPEG\be3A7AC.jpg""

Hope that helps :)
 
Status
Not open for further replies.
Back
Top