run shell script with two file inputs

Hi,

I am not sure if what I want to do is possible in Automator, perhaps I need to dive into Applescript, but here goes.

I want to run the exiftool shell script, which takes two file inputs for the source and destination files, as follows:

donald$ exiftool -all= -tagsfromfile /Users/donald/Pictures/iPhoto\ Library/2007/06/28/DSCN6029.JPG -exif:all /Users/donald/Pictures/Panoramas/2007/eye.jpg

so what i would like to be able to do, rather than trying to remember that and having to type it every time, is run a script that prompts for the 2 files (source and destination) and then runs the script

"exiftool -all= -tagsfromfile (source) -exif:all (destination) "

Is this possible? Many thanks for any suggestions or hints/links on how this might be accomplished.

Donald

Model: iMac G5 2GHz 20"
Browser: Safari 419.3
Operating System: Mac OS X (10.4)

Hi,

of course this is possible.
Either with Automator (Run AppleScript action)

on run {input, parameters}
	set s to quoted form of POSIX path of (choose file with prompt "choose source file" without invisibles)
	set d to quoted form of POSIX path of (choose file name with prompt "choose destination")
	do shell script "exiftool -all= -tagsfromfile " & s & " -exif:all " & d
	return input
end run

or as an AppleScript applet, saved as an application

set s to quoted form of POSIX path of (choose file with prompt "choose source file" without invisibles)
set d to quoted form of POSIX path of (choose file name with prompt "choose destination")
do shell script "exiftool -all= -tagsfromfile " & s & " -exif:all " & d

Thanks,

I had just been trying with the default actions in automator, and was not able to see how to do this, but when it is written as an applescrit it makes perfect sense. I think i need to learn more about applescript

Donald

Automator is actually a Graphic User Interface for AppleScript,
you can do (almost) everything directly with AppleScript