Post a reply

Options
Add an Attachment

If you do not want to add an Attachment to your Post, please leave the Fields blank.

(maximum 10 MB; please compress large files; only common media, archive, text and programming file formats are allowed)

Options

Topic review

martin

Just modify your existing powershell.exe command-line in the batch file.
Vann_the_Red

Excellent. Happy to do so. I don't know if it's the batch file or WinSCP, I'm just trying to figure that out. Where do I add that command? The batch file or the WinSCP script?
Thanks,
VtR
martin

Vann_the_Red wrote:

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.

If you believe the problem is on WinSCP-side, I'm interested.
In that case, please post the output.
You can capture it by doing something like:
powershell .... > output.txt 2>&1
Vann_the_Red

Martin,
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.
Thanks for your help,
VtR
martin

That's a log file again. Not a capture of the output.
Anyway, does it matter? Haven't you moved to another solution anyway?
Vann_the_Red

Martin,
Here is the complete (redacted) log from a run of the script. I have only redacted folder locations, IP/ports, and anything that identifies the data partner. I hope I've understood you properly this time.
Regards,
VtR
martin

The script outputs lot of progress messages using Write-Host. I've asked for that output.
Vann_the_Red

Martin,
First, thank you for the correction! I'll put that in place.
Second, I guess I'm confused by what you mean by output. The output of the script is a successful download to the temp directory. What I need to add is a move of that download from the temp folder to the live folder.
Regards,
VtR
martin

I've asked for an output, not for a log file.

Though, as you have switched to PowerShell anyway: Not in finally { }! You want to move the files on success only. So, for example after Write-Host "Done, downloaded $count files.".
Vann_the_Red

Martin,
I've attached the tail of the log from a successful connection. At that point, the batch file exits as well.

For your comment or to help others, here's how I'm planning to modify your script. First, I will add an optional parameter: