Welcome to OStack Knowledge Sharing Community for programmer and developer-Open, Learning and Share
Welcome To Ask or Share your Answers For Others

Categories

0 votes
542 views
in Technique[技术] by (71.8m points)

batch file - How to schedule an automatic FTP download on Windows?

I need to connect to a host with username, password, implicit TLS encryption and port number to download files to a folder daily on windows server standard. Is there a third party command-line application that I could download, install and use for this (preferably free)? I'm not absolutely sure if this could be done with Windows ftp and if it can, could it be done in batch file?

I am trying NcFTP but I'm not sure if it supports encryption either.


I was given specific credentials, I have no control over the server. I have only instructions on how to access and download the files with FileZilla client over TLS. I need to schedule a routine that does this job for me since I don't want to manually do this every day. I can manage myself on this I only need a tool that could do this job over command-line.

See Question&Answers more detail:os

与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…
Welcome To Ask or Share your Answers For Others

1 Answer

0 votes
by (71.8m points)

You can use WinSCP, it supports both scripting and TLS/SSL.

See automating file transfers to FTP server.

A simple batch file to download files over an explicit TLS/SSL (note the ftpes://) with WinSCP looks like:

winscp.com /log=c:pathftp.log /command ^
    "open ftpes://user:[email protected]/" ^
    "get /home/user/* c:destination" ^
    "exit"

You can have the batch file generated by WinSCP GUI for you.


For scheduling, simply use the Windows Scheduler.
For details see scheduling file transfers to FTP server.

(I'm the author of WinSCP)


Similarly for an upload: Schedule an automatic FTP upload on Windows with WinSCP


与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…
Welcome to OStack Knowledge Sharing Community for programmer and developer-Open, Learning and Share
Click Here to Ask a Question

2.1m questions

2.1m answers

60 comments

57.0k users

...