[User command] Supply filenames twice in command-line
Posted: 13 Nov 2015 20:36
I want to call a command-line function by using a user command where I supply the item names twice.
For instance, assume the following 3 files are selected:
Z:\My Pictures\MyPic 1.jpg
Z:\My Pictures\MyPic 2.jpg
Z:\My Pictures\MyPic 3.jpg
This is what I want to do:
"C:\Utilities\JpegTran\JpegTran.exe" -copy none -optimize "Z:\My Pictures\MyPic 1.jpg" -output "Z:\My Pictures\MyPic 1.jpg"
"C:\Utilities\JpegTran\JpegTran.exe" -copy none -optimize "Z:\My Pictures\MyPic 2.jpg" -output "Z:\My Pictures\MyPic 2.jpg"
"C:\Utilities\JpegTran\JpegTran.exe" -copy none -optimize "Z:\My Pictures\MyPic 3.jpg" -output "Z:\My Pictures\MyPic 3.jpg"
This is what I tried: (doesn't work):
Category : Open With
Action : Open selected List item(s) with specified application.
Caption : JpegTran
Application : "C:\Utilities\JpegTran\JpegTran.exe" -copy none -optimize <selitems> -output <selitems>
Mode : Multiple instance (pass each of the items to its own instance of the application).
Does anyone know how I can get this to work?
For instance, assume the following 3 files are selected:
Z:\My Pictures\MyPic 1.jpg
Z:\My Pictures\MyPic 2.jpg
Z:\My Pictures\MyPic 3.jpg
This is what I want to do:
"C:\Utilities\JpegTran\JpegTran.exe" -copy none -optimize "Z:\My Pictures\MyPic 1.jpg" -output "Z:\My Pictures\MyPic 1.jpg"
"C:\Utilities\JpegTran\JpegTran.exe" -copy none -optimize "Z:\My Pictures\MyPic 2.jpg" -output "Z:\My Pictures\MyPic 2.jpg"
"C:\Utilities\JpegTran\JpegTran.exe" -copy none -optimize "Z:\My Pictures\MyPic 3.jpg" -output "Z:\My Pictures\MyPic 3.jpg"
This is what I tried: (doesn't work):
Category : Open With
Action : Open selected List item(s) with specified application.
Caption : JpegTran
Application : "C:\Utilities\JpegTran\JpegTran.exe" -copy none -optimize <selitems> -output <selitems>
Mode : Multiple instance (pass each of the items to its own instance of the application).
Does anyone know how I can get this to work?