是否可以从Windows 7中的命令行以递归方式从FTP下载所有文件和文件夹? [英] Is it possible to recursively download all the files and folders from an FTP from the command line in windows 7?

查看:484
本文介绍了是否可以从Windows 7中的命令行以递归方式从FTP下载所有文件和文件夹?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

大家好,



我想从工业PC上下载所有文件和文件夹,以便自动执行备份任务。



应该用批处理文件来完成。



我见过mget并获得FTP命令,但似乎不是递归工作,它只检测文件作为可能的目标...文件夹被标记为不是常规文件



我的脚本使用:



Hi all,

I'd like to download all the files and folders from an industrial PC in order to automate a backup task.

That should be done with a batch file.

I've seen mget and get FTP commands, but it seems that is not working recursively and it only detects files as possible targets... folders are marked as "not a regular file"

My script is called using:

ftp -i -s:ftpscript.txt





脚本的内容是:





The contents of the script are:

open 192.168.1.1

username

password

lcd c:\myDestinationFolder

mget *.*

quit





有什么想法吗?



非常感谢。



我尝试过:



搜索互联网,阅读有关FTP命令的所有文档。



Any idea?

Thank you very much.

What I have tried:

Searched the Internet, read all the documentation about FTP commands.

推荐答案

我在 NSFTOOLS:Microsoft命令行的FTP命令列表中找不到任何内容FTP客户端 [ ^ ],可以确定文件夹的元素是文件夹或文件。我不认为你可以通过纯粹使用正版Windows ftp客户端的脚本工具来实现你的目标。

你可以开发一个应用程序来处理逻辑。有适用于所有主要语言和技术的ftp客户端库。

亲切。
I cannot find anything in NSFTOOLS: List of FTP commands for the Microsoft command-line FTP client[^] which allows to determine whether a folder's element is a folder or a file. I do not think you will be able to achieve your goal by using purely the script facility of genuine Windows ftp client.
You could develop an application to handle the logic, though. There are ftp client libraries for all major languages and technologies.
Kindly.


这篇关于是否可以从Windows 7中的命令行以递归方式从FTP下载所有文件和文件夹?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆