ExifTool Forum

ExifTool => The "exiftool" Application => Topic started by: John.ZachryCorp on February 14, 2022, 11:06:59 AM

Title: Can I extract metadata from my clipboard?
Post by: John.ZachryCorp on February 14, 2022, 11:06:59 AM
Is it possible to extract metadata from files copied to your clipboard? I am trying to extract data when a user pastes a collection of files into the application. Rather than running a foreach loop to extract a tag value for every file, i was hoping to simply send the clipboard, or a list, of file names to the exiftool so it could run the iterations. my hope is that this will help speed up the process since it would be one request instead of multiple.
Title: Re: Can I extract metadata from my clipboard?
Post by: StarGeek on February 14, 2022, 11:19:46 AM
No, exiftool can't read the clipboard.  But you can use a temp file or pipe the file list to exiftool using the -@ (Argfile) option (https://exiftool.org/exiftool_pod.html#ARGFILE).  For example
exiftool -@ Filelist.txt <more options>
or using the - to read from the stdin
find <options> | exiftool -@ - <more options>
Title: Re: Can I extract metadata from my clipboard?
Post by: John.ZachryCorp on February 14, 2022, 11:38:40 AM
Awe bummer. Well that sounds like a good alternative, thank you StarGeek!