[Closed] doscommand exiftool
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:
ew folder\exif\ExifTool\IMG_0373.JPG"
EXIF_ExifFilename = "D:
ew 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
String fields requires double slashs when defining a \ in MaxScript.
EXIF_ImageFile = “D:
ew folder\exif\ExifTool\IMG_0373.JPG”
defines EXIF_ImageFile to be:
“D:
ew folder\exif\ExifTool\Exiftool.exe”
as “
” defines a newline Character in your string
You want:
EXIF_ImageFile = "D:\
ew folder\\exif\\ExifTool\\IMG_0373.JPG"
EXIF_ExifFilename = "D:\
ew folder\\exif\\ExifTool\\Exiftool.exe"
Still not working. Here’s what I’ve tried.
DOSCommand “D:
ew folder\exif\ExifTool\IMG_0373.JPG” + ” -h ” + “D:
ew folder\exif\ExifTool\Exiftool.exe” + “> out.txt”
DOSCommand “D:
ew folder\exif\ExifTool\IMG_0373.JPG” + ” -h ” + “D:
ew folder\exif\ExifTool\Exiftool.exe” + ” > out.txt”
all give
– Incompatible types: 1, and ” -h “
EXIF_ImageFile = “D:
ew folder\exif\ExifTool\IMG_0373.JPG”
EXIF_ExifFilename = “D:
ew 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.
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…