Just modify your existing
powershell.exe command-line in the batch file.
powershell.exe command-line in the batch file.
I thought we were trying to determine why we do not return to the batch file after the script completes. If that is not of interest, we'll just drop it.
powershell .... > output.txt 2>&1
Write-Host. I've asked for that output.
finally { }! You want to move the files on success only. So, for example after Write-Host "Done, downloaded $count files.".