Skip to content
Permalink
Browse files

Generate file names using valid symbols only

... the url of bing images was changed. This caused invalid characters to appear
in automatically chosen file names.
  • Loading branch information
episource committed Nov 8, 2019
1 parent 3488209 commit b9834368397938b7d1ebb62bd21e42c205ee45ba
Showing with 1 addition and 1 deletion.
  1. +1 −1 get-bingimg.ps1
@@ -110,7 +110,7 @@ $bingResponse = Invoke-WebRequest -UseBasicParsing "http://www.bing.com/HPImageA
$bingResponseJson = ConvertFrom-Json $bingResponse.Content
$bingResponseJson.images | %{
$title = $_.copyright
$fname = "$(Split-Path -Leaf $_.urlbase).jpg"
$fname = "$($_.startdate)_$($_.hsh).jpg"
$file = Join-Path $TargetDir $fname

If (Test-Path -Type Leaf $file) {

0 comments on commit b983436

Please sign in to comment.
You can’t perform that action at this time.