在Windows中通过FTP复制文件夹 [英] Copy folders through FTP in Windows

查看:597
本文介绍了在Windows中通过FTP复制文件夹的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我有一台Windows 2012服务器,正在尝试通过FTP复制文件夹.该文件夹中包含多个文件夹,大小约为12 GB. 可以使用什么命令来复制整个树结构,包括其中的所有文件夹和文件.

I have a Windows 2012 server where I am trying to copy a folder through FTP. The folder contains multiple folders inside it and the size is around 12 GB. What command can be used to copy the whole tree structure including all the folders and files inside it.

  • 我无法压缩该文件夹.
  • 我也尝试过使用mget*,但是它会复制所有文件中的所有文件 文件夹,但未创建文件夹结构.
  • 由于提示显示"invalid command",我无法使用TAR命令.
  • I cannot zip this folder.
  • Also I have tried using mget* but it copies all files from all the folders but doesn't created folder structure.
  • I am unable to use TAR command as the prompt shows "invalid command".

推荐答案

Windows命令行FTP客户端ftp.exe不支持递归目录传输.

Windows command-line FTP client, the ftp.exe, does not support recursive directory transfers.

您必须为此使用第三方FTP客户端.

You have to use a 3rd party FTP client for that.

例如,对于 WinSCP FTP客户端,您可以使用类似以下的批处理文件:

For example with WinSCP FTP client, you can use a batch-file like:

winscp.com /command ^
    "open ftp://user:password@example.com/" ^
    "get /folder/* c:\target\" ^
    "exit"

它将自动下载/folder中的所有文件和子文件夹.

It will automatically download all files and subfolders in the /folder.

有关详细信息,请参见WinSCP指南,以自动从FTP服务器传输文件.还有一个指南将将Windows ftp.exe脚本转换为WinSCP .

For details, see WinSCP guide to automating file transfers from FTP server. There's also a guide for converting Windows ftp.exe script to WinSCP.

(我是WinSCP的作者)

这篇关于在Windows中通过FTP复制文件夹的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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