-1

In looking at other posts, "Batch file for PuTTY/PSFTP file transfer automation", regarding automating the PSFTP command in a .bat file so that I can setup a Windows Scheduled Task, I tried the following but got the error below:

In the .bat file that I'm executing I have the following lines:

@echo off
cd "c:\PuTTY"
psftp 999.99.999.999 -l XXXXXIO -i testGSX.ppk -b DownloadDiscoverReports.txt 

In the DownloadDiscoverReports.txt file I have the following lines:

lcd c:\Reports\GSXDLFILES\ALLRPTS
cd /DSCVROUT/ALLRPTS/
mget *ALLRPTS%POLLABLE*
lcd c:\Reports\GSXDLFILES\XMIT81
cd /DSCVROUT/XMIT81/
mget *XMIT81%POLLABLE*

The error I'm getting when I execute the .bat file from my C:\ is:

C:\>gsx_dl.bat
psftp: no hostname specified; use "open host.name" to connect
New local directory is c:\Reports\GSXDLFILES\ALLRPTS
psftp: not connected to a host; use "open host.name"

C:\PuTTY>

Any suggestions/direction on how to fix this issue would be appreciated. Thank you.

Community
  • 1
  • 1
Melinda
  • 1,501
  • 5
  • 25
  • 58
  • Since I did not get a response I'd like to try and clarify. When I execute the commands in my .bat file from the command line at my c:\PuTTY prompt it works great. But when I try to execute the .bat file from my c:\ I get the same error I did above. Again, any help/direction would be appreciated. Thanks. – Melinda Aug 20 '13 at 11:47

1 Answers1

-1

This issue has been resolved. PuTTY support responded to my issue and I entered a -v switch to my command and found that my KEY had expired and that was the issue.

Thanks anyway.

Melinda
  • 1,501
  • 5
  • 25
  • 58