I have around 14 GB of photos that need to be compressed. I use an application mogrify.
Which so far I can do what I require that is compress the image by 50% using this one liner.
mogrify -quality 50% *.jpg
Now, that only works in the current folder, so I put together a very simple PS version:
Get-ChildItem E:\PHOTOGRAPHS -Include *.jpg -Recurse | foreach ($_) {
mogrify -quality 50% $_.FullName
}
What I would like is the current filename to be displayed with path, but am struggling to be able to do it.
Simply echo the full name of the file inside the
ForEach-Objectloop: