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

查看:70
本文介绍了在 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* 但它会从所有文件夹,但不创建文件夹结构.
  • 我无法使用 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.

您必须为此使用第 3 方 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:	arget" ^
    "exit"

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

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

有关详细信息,请参阅 从 FTP 服务器自动传输文件 的 WinSCP 指南.还有一个将 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天全站免登陆