The bad part is when writing "good" powershell the verbosity is exponentially worse and it turns into
try
{
if (-not [string]::IsNullOrEmpty($_.Column8))
{
$fullPathName = Join-Path -Path $dstDir -ChildPath $_.Column8
$pathTestResult = test-path -LiteralPath $fullPathName -ErrorAction Stop
# This is a hashtable of the parameters to a cmdlet
# the only purpose of this 'splatting' is that
# powershell commands get too long
# and can't be line-wrapped in any good way
$exportParams = @{
Encoding = 'ASCII'
NoTypeInformation = $true
Append = $true
LiteralPath = $fullPathName
Verbose = $true
}
Export-Csv $exportParams
}
}
catch [whatever]
{
}