I'm trying to return a text file containing some details about image files in a folder and its subfolders. Specifically:
- File Path
- Image extension
- Image Dimensions
- Date taken
- Camera Model
These properties might not all be available for every image – I'm not sure if that will be a problem yet.
Getting the list of files is fine; DIR C:\[...]\FOLDER\*.* /S|
(I think). It's the next part I'm not sure about; I've found info on other OSs, I've also heard WMIC
suggested. I tried to use that with a test on a single file:
wmic datafile where Name="C:\[...]\IMG_5443.JPG" get Name,FileType > "C:\[...]\info.txt"
But it returns Error: Invalid query
so I'm guessing WMIC doesn't work with images, or at least some of the arguments need to change.
I also notice, when I enter wmic datafile get/?
that dimensions is not listed as one of the available properties. That's about as much troubleshooting as I know how to do.
So is there a way to return properties of an Image file (or list of files) in windows using the command line. If not, I'm open to anything that doesn't require installing additional software. Any suggestions?
Best Answer
How can I get the properties of an Image file in windows using the command line?
You can do this using PowerShell.
...
...
...
Source Use PowerShell to Find Metadata from Photograph Files
Read the above source link to see what other metadata is avaialable.