Upload files to multiple folders using FTP [closed]
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 questionI 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:
- Download and install WinSCP and run it
- Connect to Server
- Go to Menu >Session >Server/Protocol Information
- 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)
精彩评论