Page 2 of 2

Posted: Mon Dec 08, 2008 6:25 pm
by SparkOut
What happens if you try wrapping the whole (quoted) path and argument string in another set of quotes?

Code: Select all

put shell(quote & quote & "C:/My ExifPath/exiftool" & quote && quote & "C:/Path To My Image.jpg" & quote & quote) into fld "Test"

Posted: Tue Dec 09, 2008 11:47 am
by Zax
Mark wrote:You might try the shortFilePath function, to replace the file paths you are currently using
You're right: now it works... at least! :)
I didn't know this rev function.

Thanks a lot Mark for all your help.

Now, speaking cosmetic, it's rather annoying with windows to see the console each time I call exiftool with shell. Maybe there is an ExifTool's parameter to correct this but maybe this is due to the OS.

Posted: Tue Dec 09, 2008 12:23 pm
by SparkOut
Hi Zax

Did it also work if you just wrapped the whole in another pair of quotes, as above? :wink:

And to hide the console window there is another rev command. Before you fire off the shell, use

Code: Select all

set the hideConsoleWindows to true
and you won't see the window.

Posted: Wed Dec 10, 2008 9:32 am
by Zax
SparkOut wrote:

Code: Select all

put shell(quote & quote & "C:/My ExifPath/exiftool" & quote && quote & "C:/Path To My Image.jpg" & quote & quote) into fld "Test"
RunRev doesn't understand this syntax, even with a simple quote (').

Thanks for the "hideConsoleWindows" property :)

Posted: Wed Dec 10, 2008 10:38 am
by SparkOut
That's odd. I don't have exiftool to try but this works just fine (and should in theory for all permutations of command line paths with arguments, on Windows XP)

Code: Select all

put shell (quote & quote & "C:/Test Spaces/notepad" & quote && quote & "C:/Test Spaces/test file name with spaces.txt" & quote & quote) into fld "Test"
(I deliberately moved notepad into the test folder.)

What's the error you get with RunRev?

Posted: Wed Dec 10, 2008 3:16 pm
by Zax
SparkOut wrote:What's the error you get with RunRev?
If I well remember, the generic RunRev syntax error.

Posted: Thu Dec 11, 2008 6:41 am
by Janschenkel
You have a pair of quotes too many, and the paths under Windows have to use baclslashes instead of slashes. Try the following:

Code: Select all

put quote & "C:\My ExifPath\exiftool.exe" & quote && quote & "C:\Path To My Image.jpg" & quote into theShellCommand
put shell(theShellCommand) into fld "Test"
HTH,

Jan Schenkel.

Posted: Thu Dec 11, 2008 8:56 am
by SparkOut
Hi Jan - well under Windows you should use backslashes in the path, but under many (not all) circumstances (at least on my XP system) the path works with forward or backslashes, so I couldn't be bothered to change them in this case.
The extra pair of quotes is to wrap the entire command line instruction including arguments. Because of the spaces in the path and file name, (even using backslashes rather than forward) without that extra pair wrapping the line you get the error:

Code: Select all

'C:\<firstwordofthepathwithspaces>' is not recognized as an internal or external command, operable program or batch file.
Wrapping in an extra pair of quotes solves the issue - at least for me. This is a quirk of Windows, rather than Rev syntax, I think.