Comments (8)

  1. Ben says:

    File/photo metadata stuff should have been built into Powershell 4.0 in my opinion

  2. Andy Terry says:

    Looks very handy. Just tried this and got as far as setting and calling the $picMetaData for a folder. It didn’t list anything when i just has a TIF file in there but when i created a jpg version of the same file it listed the details of both. Tried deleting
    the jpg and back to no listing. Apologies if i’m missing something as a Powershell lightweight

  3. Dan Jeuch says:

    I looked into a lot of these kinds of methods including some others, but ended up mixing in a utility I’ve used for years (ExifTool) and using it’s XML output to get it into PowerShell. Wrote it up at http://www.jeuch.com/wp/2014/04/05/powershell-and-image-meta-information-even-raw/ if anyone is interested.

  4. yaro137 says:

    Worth noting when a script requires WMF 3.0

  5. John says:

    newbie alert… more photographer than programmer but attempting to learn how to use Powershell for managing thousands of files based on metadata. this looks very promising to me.

    Unfortunately I haven’t been able to get this example to run, so thought I’d ask for a little help. Thank you in advance.

    I’ve loaded Get-FileMetaDataReturnObject into memory and then attempt to use it as show above but get the following:

    PS C:Windowssystem32> $picMetadata = Get-FileMetaData -folder (Get-childitem C:test -Recurse -Directory).FullName
    Get-ChildItem : A parameter cannot be found that matches parameter name ‘Directory’.
    At line:1 char:83
    + $picMetadata = Get-FileMetaData -folder (Get-childitem C:test -Recurse -Directory <<<< ).FullName
    + CategoryInfo : InvalidArgument: (:) [Get-ChildItem], ParameterBindingException
    + FullyQualifiedErrorId : NamedParameterNotFound,Microsoft.PowerShell.Commands.GetChildItemCommand

    I’m sure I’m missing something obvious here, but have spent a lot of time trying to figure this out and one of you will probably know my problem instantly. Thx!

  6. an phu says:

    @John, The -Directory parameter is available in powershell v2 and above.

    https://technet.microsoft.com/en-us/library/hh847897(v=wps.620).aspx

  7. Zewwy says:

    Did I miss something?

    I grabbed the script (which to note there are 2 different Get-FileMetaData scripts available) make sure you grab the one actually linked in this blog and import it only. Importing the other one (which is actually a module and not just a ps1 script) will cause issues.

    I noticed it works, however it will only grab files that are within subfolders of the parent folder specified, and not the files within the actual parent folder.

    E.G. C:\blah\ which has (folders Blah1 and blah 2) and 5 png files, with each subfolder having 1 image file each.
    I specify in the command to point to c:\blah and it only returns 2 files, the ones in the sub folders, and neglects the 5 png files in the folder I directly specified.

    Did I miss something?

  8. Kimbre Hill says:

    Can this be done in reverse? Can metadata can be added to JPEG files from another document like Excel or Access? Each tag, title, comment, etc. would be different. Example: an architect takes 100 photos at a job site then uploads them to his computer. Those 100 photos need identifiers as to what each picture means to a contractor, insurance claims adjuster, etc. The architect creates a photo log (typing everything manually) in Excel containing:
    1. Photo file name (after I batch rename them using Adobe Bridge)
    2. Location (i.e. “interior of south wall”)
    3. Description (i.e. “water damage from ceiling”)
    4. A hyperlink to the JPEG file
    I then use Adobe Lightroom to create simple “prints” that put 2 photos on a page along with custom captions & our logo. Right now the only useful information for the caption is the photo/file name and the date photo was taken. I would like to include the Location (title) and Description (tag) from the JPEGS’ metadata without having to manually type the info from the architect’s Excel sheet into Windows Explorer.
    Thanks,
    Kim Hill

Skip to main content