-Thanks
Code: Select all
$jpgfiles = dir "C:\Users\bernie\Photo Staging\Date Stamp\*.jpg"
foreach ($jpgfile in $jpgfiles) {
$file = Get-Item $jpgfile # notice we do not use or want quotes in PowerShell
$lwt = $File.LastWriteTIme
convert "$jpgfile" -font Arial -pointsize 60 -fill lightblue -quality 100 -gravity southeast -auto-orient -annotate +80+50 %[exif:DateTimeOriginal] "$jpgfile"
#Write-Host $jpgfile
$file = Get-Item $jpgfile # notice we do not use or want quotes in PowerShell
$file.LastWriteTime = $lwt
}
XYplorer Beta Club