add more detail to output file

This commit is contained in:
Erik Eckert 2023-08-10 13:54:29 -06:00
parent 361ce147eb
commit 6c430f8c24

View File

@ -34,7 +34,7 @@ do {
if ($_) {
Write-Debug -Message ("Checking " + $_.unique_id) -Debug
$testURI = $_.pdf_link + '&auth_token=' + $USING:APIToken
$Outfile = $USING:OutputPathBase_Project + '\' + $_.unique_id + ".pdf"
$Outfile = $USING:OutputPathBase_Project + '\' + $_.unique_id + '_' + $_.Date.Substring(0,10) + ".pdf"
if (!(Test-Path $Outfile)) {
Write-Debug ("Saving file: " + $Outfile) -Debug
Invoke-WebRequest -Uri $testURI -OutFile $Outfile