0

I used Automator to create a service that runs pdf2svg from the context menu in Finder.

for f in "$@"
do
    /opt/local/bin/pdf2svg $f ${f%.*}".svg"
done

It works fine, except it does not work on files stored in my dropbox folders.

How can I fix this?

1
  • 1
    What does "does not work" mean? Is it not visible in the context menu, does it run without output/result or something else?
    – nohillside
    Commented Sep 25, 2014 at 12:35

1 Answer 1

1

If any of your files or folders in Dropbox happen to have spaces, your script will not behave as you expect. You can fix that by adding quotes to the appropriate places like so:

for f in "$@"
do
    /opt/local/bin/pdf2svg "$f" "${f%.*}.svg"
done

If that isn't the source of the problem, please update your question with more specifics as to what the behavior is that you see when you run this script manually from the command line.

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .