PDA

View Full Version : doscommand exiftool


darkmoon3d
07-07-2009, 10:06 PM
I'm trying to get doscommand to work with processing image file with exiftool (http://www.sno.phy.queensu.ca/~phil/exiftool/) to get exif results. Have tested at dos command line and works great but can't seem to get it to work with Max. Am using 3ds9sp2.



EXIF_ImageFile = "D:\new folder\exif\ExifTool\IMG_0373.JPG"
EXIF_ExifFilename = "D:\new folder\exif\ExifTool\Exiftool.exe"


DOSCommand EXIF_ExifFilename -h + EXIF_ImageFile > out.txt


Have tried different formating and having no luck:

DOSCommand EXIF_ExifFilename -h EXIF_ImageFile > out.txt
-- No ""u-"" function for undefined

DOSCommand EXIF_ExifFilename + " -h" + EXIF_ImageFile + " > out.txt"
-- Incompatible types: 1, and " -h "

DOSCommand "EXIF_ExifFilename -h EXIF_ImageFile > out.txt"
1
creates out.txt file but empty so didnt' process correctly

shellLaunch "EXIF_ExifFilename -h EXIF_ImageFile > out.txt"
-- Argument count error: ShellLaunch wanted 2, got 1

Kramsurfer
07-08-2009, 12:45 AM
String fields requires double slashs when defining a \ in MaxScript.

EXIF_ImageFile = "D:\new folder\exif\ExifTool\IMG_0373.JPG"

defines EXIF_ImageFile to be:
"D:
ew folder\exif\ExifTool\Exiftool.exe"
as "\n" defines a newline Character in your string


You want:


EXIF_ImageFile = "D:\\new folder\\exif\\ExifTool\\IMG_0373.JPG"
EXIF_ExifFilename = "D:\\new folder\\exif\\ExifTool\\Exiftool.exe"

darkmoon3d
07-08-2009, 01:57 AM
Still not working. Here's what I've tried.


DOSCommand "D:\\new folder\\exif\\ExifTool\\IMG_0373.JPG" + " -h " + "D:\\new folder\\exif\\ExifTool\\Exiftool.exe" + "> out.txt"

DOSCommand "D:\new folder\exif\ExifTool\IMG_0373.JPG" + " -h " + "D:\new folder\exif\ExifTool\Exiftool.exe" + " > out.txt"

all give
-- Incompatible types: 1, and " -h "



EXIF_ImageFile = "D:\\new folder\\exif\\ExifTool\\IMG_0373.JPG"
EXIF_ExifFilename = "D:\\new folder\\exif\\ExifTool\\Exiftool.exe"
DOSCommand "EXIF_ExifFilename -h EXIF_ImageFile > out.txt"

this gives value of 1 and empty txt file.

Reading through past posts on doscommand problems it seems shellLaunch has been used instead and worked. Not having luck with it either though.

Kramsurfer
07-08-2009, 02:51 AM
DOSCommand ( EXIF_ExifFilename + " -h" + EXIF_ImageFile + " > out.txt" )

almost there, just a few ()'s should do it...

Max is executing the DOSCommand EXIF_ExifFilename and getting a integer value... 0 or 1 depending on if it executed or not... then attempting to add the remaining string items...

by putting all the string items in ()'s, it will make the complete string FIRST and then execute the DOSCommand on the whole string...

see "Block-expressions" in the MSX help for a full explaination..

CGTalk Moderation
07-08-2009, 02:51 AM
This thread has been automatically closed as it remained inactive for 12 months. If you wish to continue the discussion, please create a new thread in the appropriate forum.