Doubt in automating a script

Advertisement

rickaves
Joined:
Posts:
3
Location:
Mexico

Doubt in automating a script

Hello everyone
I want to make this batch work
@echo off
"C:\Program Files (x86)\WinSCP\WinSCP.com" ^
ftp://USER:PASSWORD@IP 
cd /
lcd C:\Users\SESA739062\Desktop\logs 
get log
exit
When trying this .bat, it remains after logging and getting the cursor winscp>.
And when I do it manually, line per line, it works and I got the log folder copied on the destination.
So, is there a way to make it work by just executing the .bat?
I've been looking for info like this in the forum with no success.
Thanks in advance and best regards!

Reply with quote

Advertisement

rickaves
Joined:
Posts:
3
Location:
Mexico

Just wondering if there's missing like an "enter character" after it logs in the app, because when running it, is like
  • Open the WinSCP
  • Successfully logs in
  • Keeps waiting for another command

Reply with quote

rickaves
Joined:
Posts:
3
Location:
Mexico

Adding to the thread, when executing, this is what I mean when it keeps on the curser
Connecting to MAGIC_IP ...
Connected
Starting the session...
Session started.
Active session: [1] epc@MAGIC_IP
winscp>
I've also tried this one
synchronize remote "C:\Users\SESAXXX\Desktop\logs" "/log"
But same results

Reply with quote

Advertisement

You can post new topics in this forum