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.
- 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 command-line FTP client, the
ftp.exe
, does not support recursive directory transfers.You have to use a 3rd party FTP client for that.
For example with WinSCP FTP client, you can use a batch-file like:
It will automatically download all files and subfolders in the
/folder
.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.(I'm the author of WinSCP)
The target dir is a zip file. You can copy the full zip file into the ftp server using below code.
}