Dan
asked on
automate FTP transfer
What is the easiest way to automate an FTP transfer? For example, I have an .mp4 file that I want to FTP to a location automatically everyday for 10 days, and on the 10th day, there will be 2 transfers that day. Each day, the file name will be different.
I did some searching, and it doesn't look like filezilla support scripting. I installed winscp, but I don't know much about scripting, so does anyone know of a free solution to do this, that is easy?
I guess I can also use the task scheduler to schedule the task, but not sure who to script winscp to start with the correct FTP settings.
Any ideas?
I did some searching, and it doesn't look like filezilla support scripting. I installed winscp, but I don't know much about scripting, so does anyone know of a free solution to do this, that is easy?
I guess I can also use the task scheduler to schedule the task, but not sure who to script winscp to start with the correct FTP settings.
Any ideas?
ASKER CERTIFIED SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
ASKER
I actually want this to run on my windows server 2008 R2. This way, if my PC shuts down or something, I don't have to worry about it.
ASKER
it's FTP with explicit TLS, so that makes it a bit trickier
WinSCP it is then. :-) And you have the manual already.
ASKER
so on winscop documentation lists:
open sftp://user:password@example.com/ -hostkey="ssh-rsa 2048 xx:xx:xx:xx:xx:xx:xx:xx:xx :xx:xx:xx: xx:xx:xx:x x"
But how do I find out what the rsa certficiate info is?
open sftp://user:password@example.com/ -hostkey="ssh-rsa 2048 xx:xx:xx:xx:xx:xx:xx:xx:xx
But how do I find out what the rsa certficiate info is?
ASKER
I ran the batch script from a cmd line and it's not doing anything.
If anyone is well versed with winscp I would greatly appreciate any help.
Here's what I have:
hofscript.bat
@echo off
"C:\Program Files (x86)\WinSCP\winscp.exe" /script=hofscript.txt
hofscript.txt
# Automatically abort script on errors
option batch abort
# Disable overwrite confirmations that conflict with the previous
option confirm off
# Connect to SFTP server using a password
open ftp://user%40domain.org:password%21@ftp.domain.com/
# Upload file
put z:\hof01.mp4 /home/events/hof
# Disconnect
close
I did something wrong, as it's not working. If anyone knows, I would appreciate it.
I have 10 files I need to upload, 1 per day, and 2 on the last day, so I'm not sure if I have to have 10 different txt documents or somehow if I can add the file names to this one txt file?
If anyone is well versed with winscp I would greatly appreciate any help.
Here's what I have:
hofscript.bat
@echo off
"C:\Program Files (x86)\WinSCP\winscp.exe" /script=hofscript.txt
hofscript.txt
# Automatically abort script on errors
option batch abort
# Disable overwrite confirmations that conflict with the previous
option confirm off
# Connect to SFTP server using a password
open ftp://user%40domain.org:password%21@ftp.domain.com/
# Upload file
put z:\hof01.mp4 /home/events/hof
# Disconnect
close
I did something wrong, as it's not working. If anyone knows, I would appreciate it.
I have 10 files I need to upload, 1 per day, and 2 on the last day, so I'm not sure if I have to have 10 different txt documents or somehow if I can add the file names to this one txt file?
Do the steps manually, which helps isolate the issue.
> I have 10 files I need to upload, 1 per day, and 2 on the last day, so I'm not sure if I have to have 10 different txt documents or somehow if I can add the file names to this one txt file?
Pass the upload filename as an argument to the .bat file. See http://winscp.net/eng/docs/guide_automation#commands, Modifying the script automatically
Pass the upload filename as an argument to the .bat file. See http://winscp.net/eng/docs/guide_automation#commands, Modifying the script automatically
SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
ASKER
I think I found my solution, which is free as well.
http://www.2brightsparks.com/freeware/index.html
You can schedule when to perform the FTP transfers, seems easy to use and free.
Thanks, everyone.
http://www.2brightsparks.com/freeware/index.html
You can schedule when to perform the FTP transfers, seems easy to use and free.
Thanks, everyone.
ASKER
Thanks again.
ASKER
http://winscp.net/eng/docs/guide_automation