Welcome to OGeek Q&A Community for programmer and developer-Open, Learning and Share
Welcome To Ask or Share your Answers For Others

Categories

0 votes
529 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 Reply

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:password@example.com/" ^
    "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


与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…
OGeek|极客中国-欢迎来到极客的世界,一个免费开放的程序员编程交流平台!开放,进步,分享!让技术改变生活,让极客改变未来! Welcome to OGeek Q&A Community for programmer and developer-Open, Learning and Share
Click Here to Ask a Question

...