How to port powershell script to XYplorer?
Posted: 29 Oct 2018 04:41
To make a long story short, I've gotten into two lengthy discussions in these forums regarding passing arguments to powershell scripts. I've received numerous answers, none of which work. But I do appreciate the help. The powershell script below runs fine from the command line. Can someone show me how to accomplish the same task using an XYplorer script?
-Thanks
-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
}