How to create a .BAT
file to download file or folder from FTP server? (and replace with it existing file) (we have links like ftp://me:mypass@example.com/file.file
(or http://example.com/file.file) and absolute file link like C:\Users\UserName\Some mixed Русский English Adress\file.file
) (using only native windows (xp vista win7 etc) BAT functions and files)
相关问题
- Inheritance impossible in Windows Runtime Componen
- how to get running process information in java?
- Is TWebBrowser dependant on IE version?
- How can I have a python script safely exit itself?
- I want to trace logs using a Macro multi parameter
相关文章
- 如何让cmd.exe 执行 UNICODE 文本格式的批处理?
- 怎么把Windows开机按钮通过修改注册表指向我自己的程序
- Warning : HTML 1300 Navigation occured?
- Bundling the Windows Mono runtime with an applicat
- Windows 8.1 How to fix this obsolete code?
- CosmosDB emulator can't start since port is al
- How to print to stdout from Python script with .py
- Determine if an executable (or library) is 32 -or
Here is an example of how to automate the built-in
ftp.exe
tool:The example is about uploading, but the principle is the same (just use
get
instead ofput
).Still, since this is just "piping commands" into ftp.exe, I recommend not to do this for production-quality batch files (no error handling, etc.), but to use some external tool instead. I provided this answer only because you explicitly asked for a solution that only uses Windows built-in commands.
EDIT: Here's a concrete example:
The command-line FTP program that's built-in to most Windows operating systems is scriptable. You just need to create a text file with the commands you would send if you were running it by hand (one command per line), then execute it like this:
What FTP client software are you using? Is it scriptable? If so, create a script that downloads files and call this script from your batch file.
I'm doing this with WS_FTP.
I have previously used WGET in a batch file to accomplish this. http://www.gnu.org/software/wget/