开发者

Upload files to multiple folders using FTP [closed]

Closed. This question is seeking recommendations for books, tools, software libraries, and more. It does not meet Stack Overflow guidelines guidelines. It is not currently accepting answers. 开发者_如何学JAVA

We don’t allow questions seeking recommendations for books, tools, software libraries, and more. You can edit the question so it can be answered with facts and citations.

Closed 4 years ago.

Improve this question

I would like to upload some files into multiple folders on a single FTP account at once. I was looking all over on how to do this and couldn't find a solution. Is there an FTP client that will perform this feature?

Thanks


Here is a tutorial that I figured out after going through the docs:

  1. Download and install WinSCP and run it
  2. Connect to Server
  3. Go to Menu >Session >Server/Protocol Information
  4. Copy the "Server host key fingerprint" (ssh-rsa 2048 xx:xx:xx:xx...")

Now create a file named upload.txt, add the following content (and modify as needed):

# Connect
open sftp://user:password@example.com/ -hostkey="ssh-rsa 2048 xx:xx:xx:xx:xx:xx:xx:xx..."
# Change remote directory
cd /home/user/public
# Download file to the local directory d:
get robots.txt d:\
# Upload file to current working directory
put d:\examplefile.txt 
# Disconnect
close
# Exit WinSCP
exit

Next create a batch file run.bat with the right paths:

"C:\Program Files (x86)\WinSCP\WinSCP.com" /ini=nul /script="C:\folder-with-uploadfile\upload.txt"
pause

Run the batch file.

Check if the exampe file robots.txt was downloaded to folder D: and if examplefile.txt is in the example folder on the server.

In case of multiple servers: https://winscp.net/eng/docs/script_upload_multiple_servers


PS: I am a long-time user of FileZilla, but by Feb 2018 they do not have this feature yet. So +1 for WinSCP.


This feature isn't built into any client that I know of, or even the FTP protocol for that matter.

One client that mimics this is Cyberduck with it's "Synchronize" feature, allowing any changes on the folders you sync to be uploaded to the FTP server using timestamps.


You can use any FTP client that supports directory synchronization.

WinSCP for instance:
https://winscp.net/eng/docs/task_synchronize

(I'm the author of WinSCP)

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜