Page 1 of 1

File Transfer

Posted: 05 Mar 2015 21:08
by born2achieve
hi,

I have two FTP servers namely SampleFTP1(public FTP) and SampleFTP2 (private FTP)

Both are SFTP enabled. Lets take an example, I need to copy the text file from SampleFTP1 path C:/TestData/Test.txt and wanted to transfer to SampleFTP2 path /InputFile/Test.txt. Right now i am suing filezilla to do this as manual process. Is there any where i can automate this process by using batch script. Any example will be very helpful for me to proceed. please help me on this

Re: File Transfer

Posted: 05 Mar 2015 22:09
by Squashman
If you use a third party SFTP program that can be automated. I suggest you look at the Putty website.

Re: File Transfer

Posted: 06 Mar 2015 01:04
by foxidrive
born2achieve wrote:I have two FTP servers namely SampleFTP1(public FTP) and SampleFTP2 (private FTP)

Both are SFTP enabled. I need to copy the text file from SampleFTP1 path C:/TestData/Test.txt


That is a Windows filesystem path - not an FTP server path.

Please explain the task accurately if you need help. See here: viewtopic.php?f=3&t=6108

Re: File Transfer

Posted: 06 Mar 2015 07:10
by SilverHawk
Some months ago I used WinSCP (third party).
Try this:

winscp.com /console /command "option batch abort" "option confirm off" "option transfer binary" "open sftp://USER:PASSWORD@HOST" "put -delete ""C:/TestData/Test.txt"" ""/incoming/""" "exit"

Re: File Transfer

Posted: 06 Mar 2015 09:32
by born2achieve
Hey Guys,

Hey Squashman and SilverHawk

thanks for your suggestion. I also browsed through winscp. Should i need to install this in my server? Because i shouldn't install the third party software on my server.

Hey Fox,

Basically i need to upload file from one FTP server to another FTP using SFTP. Once i uploaded the file, i need to move the uploaded file on server1's archive folder.

Any suggestion or sample please

Re: File Transfer

Posted: 06 Mar 2015 09:35
by Squashman
born2achieve wrote: Because i shouldn't install the third party software on my server.
Then you are out of luck. Windows does not have a native SFTP client to transfer files.

Re: File Transfer

Posted: 06 Mar 2015 10:44
by SilverHawk
For me it was enough to copy:

    WinSCP.com
    WinSCP.exe

in some folder.
Install it wasn't necessary.

SilverHawk

Re: File Transfer

Posted: 06 Mar 2015 10:57
by Squashman
SilverHawk wrote:For me it was enough to copy:

    WinSCP.com
    WinSCP.exe

in some folder.
Install it wasn't necessary.

SilverHawk

Yep. Same with PSFTP. It is a self contained executable just like Putty.

Re: File Transfer

Posted: 06 Mar 2015 12:41
by born2achieve
Perfect SiverHawk and Squashman,

I downlaod the exe from below path. Please advice me is that fine to move forward to test the code provided by SilverHawk.

http://winscp.net/download/winscp570.zip

Re: File Transfer

Posted: 09 Mar 2015 08:08
by SilverHawk
I confirm that the ZIP linked is the correct one.
In my opinion, you can proceed.

SilverHawk