bat files no longer work in Windows 10

Started by RPRIETO, August 30, 2018, 02:27:21 PM

Previous topic - Next topic

RPRIETO

I had and used exiftools (v10) in another machine running windows 10, and had some bat files to run specific commands. I moved everything to a new machine (the old one died) and today when trying to run the bat files they no longer write the output csv files as expected. I did change the output address, and even tried to change it to the root C:\ but nothing works. The command window appears briefly but then shuts down and there is no file written anywhere.

I am under windows Pro 64, and just downloaded the latest version of exiftool (V 11.10)

Here are two examples of commands being run

Explore headers
exiftool -progress: -ext jpg -r -a -u -g1 -n -csv %* > C:\Users\Rui Prieto\Desktop\AragoJ tests\original pics\exif_explore.csv

Export fields to CSV
if exist C:\exif_out.csv (
exiftool -progress: -csv %* -ext jpg -DateTimeOriginal# -Make -Model -Lens -LensType -XResolution -YResolution -FNumber -ExposureTime# -ISO -FocalLength -FocalLengthIn35mmFormat -FocusDistance -HyperfocalDistance -FOV -ImageWidth -ImageHeight -SpeedX# -SpeedY# -SpeedZ# -Pitch# -Yaw# -Roll# -CameraPitch# -CameraYaw# -CameraRoll# -GPSLatitude# -GPSLongitude# -GPSAltitude# -RelativeAltitude# |findstr /V /R "^SourceFile" >> C:\exif_out.csv
) else (
exiftool -progress: -csv %* -ext jpg -DateTimeOriginal# -Make -Model -Lens -LensType -XResolution -YResolution -FNumber -ExposureTime# -ISO -FocalLength -FocalLengthIn35mmFormat -FocusDistance -HyperfocalDistance -FOV -ImageWidth -ImageHeight -SpeedX# -SpeedY# -SpeedZ# -Pitch# -Yaw# -Roll# -CameraPitch# -CameraYaw# -CameraRoll# -GPSLatitude# -GPSLongitude# -GPSAltitude# -RelativeAltitude# >> C:\exif_out.csv
)


Any idea why this is not working? Any helop will be very wellcomed

Hayo Baan

What happens when you run the scripts from within an already open command window? What error message do you get?
Hayo Baan – Photography
Web: www.hayobaan.nl

StarGeek

From what I recall, you can't write directly to C: as a security measure.  Check this TenForums post to override.

In the first example, your output filepath has spaces in it.  Put double quotes around it.
* Did you read FAQ #3 and use the command listed there?
* Please use the Code button for exiftool code/output.
 
* Please include your OS, Exiftool version, and type of file you're processing (MP4, JPG, etc).

RPRIETO

QuoteIn the first example, your output filepath has spaces in it.  Put double quotes around it.

That is it! This solves the problem;

Thank you so much @StarGeek

rui