File Transfer

Discussion forum for all Windows batch related topics.

Moderator: DosItHelp

Post Reply
Message
Author
born2achieve
Posts: 51
Joined: 16 Nov 2014 20:28

File Transfer

#1 Post by born2achieve » 05 Mar 2015 21:08

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

Squashman
Expert
Posts: 4486
Joined: 23 Dec 2011 13:59

Re: File Transfer

#2 Post by Squashman » 05 Mar 2015 22:09

If you use a third party SFTP program that can be automated. I suggest you look at the Putty website.

foxidrive
Expert
Posts: 6031
Joined: 10 Feb 2012 02:20

Re: File Transfer

#3 Post by foxidrive » 06 Mar 2015 01:04

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

SilverHawk
Posts: 17
Joined: 04 Mar 2015 01:42

Re: File Transfer

#4 Post by SilverHawk » 06 Mar 2015 07:10

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"

born2achieve
Posts: 51
Joined: 16 Nov 2014 20:28

Re: File Transfer

#5 Post by born2achieve » 06 Mar 2015 09:32

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

Squashman
Expert
Posts: 4486
Joined: 23 Dec 2011 13:59

Re: File Transfer

#6 Post by Squashman » 06 Mar 2015 09:35

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.

SilverHawk
Posts: 17
Joined: 04 Mar 2015 01:42

Re: File Transfer

#7 Post by SilverHawk » 06 Mar 2015 10:44

For me it was enough to copy:

    WinSCP.com
    WinSCP.exe

in some folder.
Install it wasn't necessary.

SilverHawk

Squashman
Expert
Posts: 4486
Joined: 23 Dec 2011 13:59

Re: File Transfer

#8 Post by Squashman » 06 Mar 2015 10:57

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.

born2achieve
Posts: 51
Joined: 16 Nov 2014 20:28

Re: File Transfer

#9 Post by born2achieve » 06 Mar 2015 12:41

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

SilverHawk
Posts: 17
Joined: 04 Mar 2015 01:42

Re: File Transfer

#10 Post by SilverHawk » 09 Mar 2015 08:08

I confirm that the ZIP linked is the correct one.
In my opinion, you can proceed.

SilverHawk

Post Reply