20 lines
541 B
PowerShell
20 lines
541 B
PowerShell
Write-Output 'Chose folder' '1) Desktop' '2) Surface'
|
|
$folder = Read-Host -Prompt 'Input your option'
|
|
$newColor = Read-Host -Prompt 'Input color'
|
|
|
|
if (!($newColor.Contains('#'))){
|
|
$newColor = "#" + $newColor
|
|
}
|
|
|
|
switch ($folder)
|
|
{
|
|
'1' {$folder = 'C:\Users\JawZ\OneDrive\Pictures\Gimp\Bookmarks\Desktop'}
|
|
'2' {$folder = 'C:\Users\JawZ\OneDrive\Pictures\Gimp\Bookmarks\Surface'}
|
|
}
|
|
|
|
$files = Get-ChildItem -Recurse -Path $folder *.png
|
|
foreach ($file in $files){
|
|
magick mogrify -format png -fill "$newColor" -colorize 100 $file.FullName
|
|
}
|
|
|