nandito Posted June 6, 2006 Posted June 6, 2006 Hi Gang, This one has got me stumped . I am trying to create a Send Event script that uses a command line application that will turn a pdf into a jpg. I want the ability to do this for every record in my table. This is the script calculation that I am using. "c:/Progra~1/PDFtoJPG/pdftojpg.exe -i " & Items::PDF Path & " -o " & Items::Folder Path & " -r 150 -q 100" The first part that calls the program works fine as my "Program Files" folder has been shortened to "Progra~1". Where I get into trouble is in the path for the input and output files. These are typically long name files and folders. When I execute the script, I get back an error that it cannot find the file name, which got truncated at the first "space" found. Does anyone know how to solve this? Thank you very much!
Wim Decorte Posted June 6, 2006 Posted June 6, 2006 No need to shorten the path, but you do need to use quotes around the path and the file name if it contains spaces. Check out the Quote() function for this...
nandito Posted June 6, 2006 Author Posted June 6, 2006 Thanks, I tried this (to test if the command line application launches) but it did not work. Quote ("c:/Program Files/PDFtoJPG/pdftojpg.exe -?") I get a "file could not be found" error> My path is correct. I did try this and it worked, but its going to be difficult if I store the application o a server path. "c:/Progra~1/PDFtoJPG/pdftojpg.exe -i " & Quote(Items::PDF Path) & " -o " & Quote(Items::Folder Path) & " -l 1 -r 150 -q 100" Any ideas? Thanks again!
Wim Decorte Posted June 6, 2006 Posted June 6, 2006 Thanks, I tried this (to test if the command line application launches) but it did not work. Quote ("c:/Program Files/PDFtoJPG/pdftojpg.exe -?") The quotes only need to go around the path to the executable and the file, not around the parameters. Quote ("c:/Program Files/PDFtoJPG/pdftojpg.exe") -? should work, but if you want to see the result you need to prefix the command with "cmd /k" to keep the command window open. Your second approach is correct.
Recommended Posts
This topic is 6747 days old. Please don't post here. Open a new topic instead.
Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
Register a new accountSign in
Already have an account? Sign in here.
Sign In Now