Reputation:
I'm trying to run a .bat file from windows xp using putty sftp. My code is below. For some reason, I keep getting an "access denied".
The annoying thing is that when I copy>paste these into the cmd prompt line by line, it works fine! I'm not sure if there's still some error with my code or if it's possible that the ftpsite.com won't accept incoming messages from a batch file?
@echo off
psftp [email protected] -pw abc#!123
cd Data/out
get file.csv
Upvotes: 0
Views: 3829
Reputation: 11
Commands to PSFTP must be placed in a SCRIPT file as in:
Filename: myscript.scr
cd Data/out
get file.csv
exit
Then you call it with:
@echo off
psftp [email protected] -pw abc#!123 -b myscript.scr
Upvotes: 1