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

Guest

Hi, thank you for all the advice you gave me, everything works perfectly.
Thank you
martin

Do you didn't use the solution I've suggested you.
So either use it!
Or try using option batch continue command.
https://winscp.net/eng/docs/scriptcommand_option#batch
(though it has side effects)

If you need help with the freeze problem, we need log files!
Guest

I'm sorry, I also noticed another problem, after downloading a maximum of 20 files the program freezes
Guest

Hi, regarding your answer I attach three files, one is the batch, the other the script and the third the generated log. As you can see from the log, the session is interrupted and the program is closed when it connects to the PC with address 172.16.130.158 because it is turned off. How to overcome the inconvenience? Thank you always for your precious advice
martin

@Guest: If you use the solution, I've pointed you to above, then for each "IP" you start new WinSCP process. So it should not be a problem that WinSCP is closed. If you need further help, show us what exactly are you doing and some logs.
Guest

Hi, thank you for the valuable advice you give me. I updated the program and now everything works fine except that if you connect to a server and find it "down" the process stops and WinSCP closes. How can I make it go forward by skipping the "down" IP?
martin

Re: Script per download files


  1. You are using 11 years old WinSCP 5.1.3. You urgently need to upgrade to the latest version.
  2. Your commandline syntax is wrong. It seems that you have something like "/ini" "=nul" there. It should be /ini=nul.

I'm not even sure that any of this is the actual cause of the problem you are facing. But it's hard to help, with all the side effects the above two points cause.
jonathan

Script per download files

Hi, this is the log that is generated. Thanks for your answers.
martin

Please attach a full session log file showing the problem (using the latest version of WinSCP).

To generate the session log file, use /log=C:\path\to\winscp.log command-line argument. Submit the log with your post as an attachment. Note that passwords and passphrases not stored in the log. You may want to remove other data you consider sensitive though, such as host names, IP addresses, account names or file names (unless they are relevant to the problem). If you do not want to post the log publicly, you can mark the attachment as private.
Guest

Hi, sorry if I'm here again taking up your precious time. The solution you gave me for downloading the files is fine but, the following week, finding the destination folder already full, WinSCP freezes and waits for keyboard input. How can I solve it?
Thank you
Guest

Hi, sorry for the late reply but I've been busy. Thank you for your kind replies, everything is working now.
Guest

winscp.com

open scp://172.16.........
user
pass
get /usr/tprsystem/validations C:\validations
exit

If it helps you, here is the script I run. If I execute one instruction at a time from the command line everything goes well........
Guest

Hi, thanks for the time you are dedicating to me, I did as you told me but unfortunately when I launch the script the winscp.com window opens but the cursor remains flashing. What could it depend on?
190919603719

Exactly, that's exactly what I intend to do
martin

Re: Script per download files

Sorry, that's as vague as before. What is "queries"?
Do you want to write a script that goes over a list of IP addresses/hostnames, connects to each and downloads some specific files from each?
jonathan

Re: Script per download files

Hi, let me explain better, from a PC I create a routine that queries the various computers allowing me to download data. Thanks for the kind replies.
martin

Re: Script per download files

Sorry, I do not know what "queries all of them from a central PC" means. Do you have some API to retrieve the list of servers?
jonathan

Script per download files

Hi, I recently discovered WinSCP and so I'm completely unaware of its use.
I ask for help to solve a problem, I need to download files from some PCs that are on different segments of the LAN (e.g. 172.16.7.50 172.16.132.160 172.16.110) and I need a script that queries all of them from a central PC PCs and download some files and put them in some folders. Thanks everyone they will help me.