Update locate-zip-code.ps1

This commit is contained in:
Markus Fleschutz 2020-12-16 12:08:44 +01:00 committed by GitHub
parent d80ef764d7
commit 03efbe6537
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -13,12 +13,12 @@ if ($CountryCode -eq "" ) {
if ($ZipCode -eq "" ) {
$ZipCode = read-host "Enter the zip code"
}
$PathToDataDir=(get-item $MyInvocation.MyCommand.Path).directory
$PathToDataDir="$PathToDataDir/../Data"
try {
write-progress "Reading zip-codes.csv..."
$PathToData=(get-item $MyInvocation.MyCommand.Path).directory
$PathToData="$PathToData/../Data"
$Table = import-csv "$PathToData/zip-codes.csv"
$Table = import-csv "$PathToDataDir/zip-codes.csv"
$FoundOne = 0
foreach($Row in $Table) {