$tgt_dir=Read-Host "Enter the path to the target photo files directory" $start_time=Get-Date -format "yyyy:MM:dd HH:mm:ssK" #get current system time Write-Host "INFO: Start_time is $start_time" #For debug visibity # 1st pass tag writing would be done here. Typically over 90% will not error out # So the "good" files would have a filemodify date gt $start_time # In this prototype, no tags are being written, so all files will be lt $start_time Write-Host "INFO: Expecting all files to pass the IF Condition" #For debug visibility exiftool -filename -if "$filemodifydate lt '$start_time'" $tgt_dir\*.jpg pause