Location: United States
Posted: 2015-01-22 17:42
I am trying to run a batch script from another PC. This batch script contains a WinSCP process. The rest of the batch script works fine, but I keep getting errors with the WinSCP portion of the program. I am a newbie, so the solution may be a very simple one. I am using "PS EXEC" to run the script from the local PC. The script on the remote PC is as follows:
cd c:\"Program Files"
winscp.exe /console /script=c:\RECON\getRECON.txt
if exist C:\RECON\Files\RECON* goto email
Powershell.exe -executionpolicy remotesigned -File C:\RECON\emailRECONfiles.ps1
move /Y C:\RECON\Files\*.* C:\RECON\Archive
The WinSCP script is as follows:
open [Saved Session]
# Change local directory
# Force binary mode transfer
option transfer binary
# Download the file to current working directory then delete on SFTP folder
# Exit WinSCP
The PowerShell script that emails works and everything else in the script works. I just keep getting emails with no attachments.
Never mind. I moved the WinSCP.ini file into the same directory that the WinSCP.exe was in and it worked perfectly.
You can post new topics in this forum
And it's free!