A collection of exiftool related code to make Powershell automation of exiftool easier. See ExifTool
ExifTool has a mode (-stay-open) where it runs in the background and reads commands from a file or stdin. See documentation: Exiftool advanced options
Doing this reliably in Powershell is difficult:
- To prevent the child process (exiftool) standard output (stdout & stderr) buffers filling and subsequently blocking the child process, stdout & stderr have to be read asynchronously. See the documentations
- This requires using events to receive output
- Powershell events use the ThreadPool and therefore are unordered.
Hence this wrapper that:
- Runs Exiftool as a child process
- Reliably sends commands and retrieves the output.