Question Anyone Know How to Get Image Tags Exported

WayTooManyAccounts

Prominent
Apr 15, 2023
13
0
510
Hello. I want to see if anyone reading might have an idea on this. I am planning to use a program to help add a bunch of tags to thousands of images. I am not going to want to type al those tags in a spreadsheet either so I been trying to find a way to get them from Command Prompt or Powershell (where most attempts were made), or from a tool called ExifTool.

I have manually added some tags into photos. In properties, I see my tags.

I have tried a dozen ways off the Internet, but I am getting empty entries if I try commands like:

Get-ChildItem "C:\path\to\folder" | Select-Object Name, Attributes | Export-Csv "I:\pic\file_metadata.csv" -NoTypeInformation

Get-ChildItem "C:\path\to\your\folder" | Select-Object Name, @{Name='Tags';Expression={(Get-ItemProperty $_.FullName).Tags}} | Export-Csv "C:\temp\pic.csv" -NoTypeInformation

Get-ChildItem -File | Select-Object Name, @{Name='Tags'; Expression={(Get-ItemProperty -Path $_.FullName).Tags}}, @{Name='Rating'; Expression={(Get-ItemProperty -Path $_.FullName).Rating}}, @{Name='DateCreated'; Expression={$_.CreationTime}}, @{Name='DateModified'; Expression={$_.LastWriteTime}} | Format-Table -AutoSize

Get-ChildItem | Select-Object Name, @{Name='Tags';Expression={(Get-ItemProperty $_.FullName).Tags}} | Format-Table -AutoSize


Entries always show blank in my test files like:

Name Tags
---- ----
20200905.jpg
20230618 posted by 02.jpg
IMG_20230129_133733_01.jpg
fam.jpg


I was using the command line methods to get information from ExifTool:

C:\Users\main\Desktop\exiftool-12.92_64>"exiftool(-k).exe" I:\_backups\albums_from_d\19xx\20200905.jpg

In that file, it showed the tags under XP Keywords:

XP Keywords : tagtest

I tried that in Powershell and got nothing:

Keywords
--------


Then I pulled all metadata using similar command, and it does not even show it at all. Other info, but not the tags, or even author (which I added as aaaa).

PSPath : Microsoft.PowerShell.Core\FileSystem::I:\_backups\albums_from_d\19xx\20200905.jpg
PSParentPath : Microsoft.PowerShell.Core\FileSystem::I:\_backups\albums_from_d\19xx
PSChildName : 20200905.jpg
PSDrive : I
PSProvider : Microsoft.PowerShell.Core\FileSystem
Mode : -a----
VersionInfo : File: I:\_backups\albums_from_d\19xx\20200905.jpg
InternalName:
OriginalFilename:
FileVersion:
FileDescription:
Product:
ProductVersion:
Debug: False
Patched: False
PreRelease: False
PrivateBuild: False
SpecialBuild: False
Language:

BaseName : 20200905
Target : {}
LinkType :
Name : 20200905.jpg
Length : 3403538
DirectoryName : I:\_backups\albums_from_d\19xx
Directory : I:\_backups\albums_from_d\19xx
IsReadOnly : False
Exists : True
FullName : I:\_backups\albums_from_d\19xx\20200905.jpg
Extension : .jpg
CreationTime : 10/2/2024 10:31:56 PM
CreationTimeUtc : 10/3/2024 2:31:56 AM
LastAccessTime : 10/4/2024 7:00:40 AM
LastAccessTimeUtc : 10/4/2024 11:00:40 AM
LastWriteTime : 10/2/2024 10:35:46 PM
LastWriteTimeUtc : 10/3/2024 2:35:46 AM
Attributes : Archive


So, here I am. Tired of trying here and there for weeks and figured maybe someone who knows about extracting this information can help.

I just want to get file names, tags, creation date, modification date (and any other info I deem later form properties), exported easily into a CSV spreadsheet. For example:

title​
creation​
modified​
tags​
20200905.jpg
10/2/2024 10:31:56 PM
10/2/2024 10:31:56 PM
dad, mom, sister​
20230618 posted by 02.jpg​
10/2/2024 10:31:56 PM
10/2/2024 10:31:56 PM
sister, zebra​

I feel I am going about this very wrong. Am not good with Powershell and using info from the 'net.

And if I show tags as a column in Window$ Explorer, or my preferred FreeCommander, it lists all the tags.

Any thoughts on getting that tag info to display and be exported? If you got something that works for you, but the command does not for me, then at least I know it could be some sort of thing with my OS (Window$ 11 Pro).

Thank you.
 
Last edited:

Ralston18

Titan
Moderator
Question about:

"I have manually added some tags into photos. In properties, I see my tags."

How was that done? E.g. Opened the photograph, then > File Properties > Details tab > Tags?

Followed by typing in " dad, mom, sister"

And you clicked "Apply" when finished?

Then, if you go back and check the "Tags" words (dad, mom, sister) are there - correct? With the commas ?

What may be causing the export problem is the commas in the tags. Possibly being treated as delimiters - CSV.

FYI:

https://woshub.com/export-csv-file-...rvices.CSV" -NoTypeInformation -Encoding UTF8

If the data contains commas then the delimiter needs to be changed. The data will still export into the spreadsheet with the break between each field/column indicated by something other than a comma.

Should be fairly straightforward to test.

As always, use test data.

Post accordingly.
 

WayTooManyAccounts

Prominent
Apr 15, 2023
13
0
510
Last edited:

WayTooManyAccounts

Prominent
Apr 15, 2023
13
0
510
Question about:

"I have manually added some tags into photos. In properties, I see my tags."

How was that done? E.g. Opened the photograph, then > File Properties > Details tab > Tags?

Followed by typing in " dad, mom, sister"

And you clicked "Apply" when finished?

Then, if you go back and check the "Tags" words (dad, mom, sister) are there - correct? With the commas ?

What may be causing the export problem is the commas in the tags. Possibly being treated as delimiters - CSV.

FYI:

https://woshub.com/export-csv-file-powershell/#:~:text=The Export-CSV cmdlet converts the resulting PowerShell object,|select-object Name,DisplayName,Status | Export-CSV "C:pSservices.CSV" -NoTypeInformation -Encoding UTF8

If the data contains commas then the delimiter needs to be changed. The data will still export into the spreadsheet with the break between each field/column indicated by something other than a comma.

Should be fairly straightforward to test.

As always, use test data.

Post accordingly.

"How was that done? E.g. Opened the photograph, then > File Properties > Details tab > Tags?"
No. Right clicking them and going into details and adding in the tags.

"And you clicked "Apply" when finished?"
You does not do that?

"Then, if you go back and check the "Tags" words (dad, mom, sister) are there - correct? With the commas ?"
No, semi colons, and not in alphabetical order which I found out is not an automatic thing.
Example as how I copied them from the property's details tab:
tagtest; wheretags
people; family; mom

"What may be causing the export problem is the commas in the tags. Possibly being treated as delimiters - CSV."
I can not even get them to display correctly. And if they not display, they not going to export.

"As always, use test data."
Common sense.

"Post accordingly."
Yes, you did okay.

But using information from the previous poster, I stumbled upon a program that does what I need right now.

Thanks for replying.