Page 1 of 1

WinSCP vs FTP.exe

Posted: 18 May 2014 01:45
by julesverne
Has anyone done any LAN speed tests for winscp command line vs ftp.exe for windows? I googled and couldn't find anything. I'm currently using WinSCP, but curious if ftp.exe would be faster. It's a windows computer passing files to a linux server.

Re: WinSCP vs FTP.exe

Posted: 18 May 2014 01:48
by foxidrive
It's on a LAN? Isn't copying the files an option?

Re: WinSCP vs FTP.exe

Posted: 18 May 2014 01:57
by julesverne
It's been awhile since I wrote the script but I feel like I was hitting a wall when I tried just using xcopy and robocopy to connect to the server. Possibly had to do with needing login and pw credentials. But it does bring up another point. If I were to get over that wall.. would robocopy be faster than winscp or ftp.exe?

Re: WinSCP vs FTP.exe

Posted: 18 May 2014 02:09
by npocmaka_
foxidrive wrote:It's on a LAN? Isn't copying the files an option?

not if the file system is not supported by Windos :-)

i have tested them over localhost with this:

http://smallftpd.sourceforge.net/

(not the same as lan but its a easy test)

plus putty ftp client. And according my tests ftp.exe is fastest (and winscp is the slowest)
plus ftp.exe supports wildcards ,but as a whole winscp has most features.

Re: WinSCP vs FTP.exe

Posted: 18 May 2014 02:11
by npocmaka_
julesverne wrote:It's been awhile since I wrote the script but I feel like I was hitting a wall when I tried just using xcopy and robocopy to connect to the server. Possibly had to do with needing login and pw credentials. But it does bring up another point. If I were to get over that wall.. would robocopy be faster than winscp or ftp.exe?

What is the file system of your unix machines? The best way to do this with SAMBA i think.

Re: WinSCP vs FTP.exe

Posted: 18 May 2014 02:36
by julesverne
Post Posted: 18 May 2014 02:48
Re: WinSCP vs FTP.exe
It's on a LAN? Isn't copying the files an option?


This prompted me to see if I could remember why I gave up before. Pretty sure it was because I couldn't get the syntax to work for net use to connect to the remote server. Possibly because I couldn't figure out what "domain" the local computer is on. Oh, but actually looking again at http://ss64.com/nt/net_use.html it doesn't even look like i can add the server without it being assigned to a drive letter first, which would require me to use pushd but pushd errors out because a password is needed to connect. But you can't add a password / login to pushd



not if the file system is not supported by Windos :-)


Currently, I can just Windows Explorer to browse to the server use my login and pw and open up a windows browser and copy files. I couldn't figure out how to do that in batch. But I know that if I can do it in Windows Explorer should be able to do it in cmd. But again that brings up the question, even if I can figure it out.. would using net use (or whatever command works) and then running robocopy be faster than using ftp.exe from the get go.

Re: WinSCP vs FTP.exe

Posted: 18 May 2014 05:17
by foxidrive
Try this method - I think Robocopy or xcopy will be faster than FTP.
Robocopy has switches to control network efficiency, if you have large filesizes (but that won't help on a Linux target machine).


Code: Select all

@echo off
net use z: \\server\share /USER:mehere Secretpassword
cd /d z:
dir
pause

Re: WinSCP vs FTP.exe

Posted: 18 May 2014 05:19
by foxidrive
npocmaka_ wrote:
foxidrive wrote:It's on a LAN? Isn't copying the files an option?

not if the file system is not supported by Windos :-)


A LAN connection translates between filesystems, if you can log in to the machine at all and copy, right?

Re: WinSCP vs FTP.exe

Posted: 19 May 2014 06:49
by Squashman
If you have the same username and password on your Windows Computer as is setup in your Samba Server on Linux then it should not be prompting you for a username and password.

You can use the NET USE command without even mapping a drive letter.

net use "\\Server\Share" /user:Username password

net use "\\Server\Share" /delete

But if this is a Samba server you could just map the drive letter through Windows Explorer and give it your credentials to the server and never have to put them in again. Windows will save your credentials.

You can do the same thing with NET USE as well by using the PERSISTENT option.

Re: WinSCP vs FTP.exe

Posted: 19 May 2014 12:33
by julesverne
foxidrive wrote:Try this method - I think Robocopy or xcopy will be faster than FTP.
Robocopy has switches to control network efficiency, if you have large filesizes (but that won't help on a Linux target machine).


Code: Select all

@echo off
net use z: \\server\share /USER:mehere Secretpassword
cd /d z:
dir
pause


Thanks foxidrive and squashman! I did get this to work. However, how do I stop it and remove the credentials? Popd doesn't work. And I want to force the user to always have to input a pw so I want to remove the credentials after every use. The other immediate reason I want to do all of what I mentioned is to run some speed tests WinSCP vs FTP.EXE vs NET USE combined with ROBOCOPY.

Re: WinSCP vs FTP.exe

Posted: 19 May 2014 14:18
by Squashman
Well what do you think will happen if you don't supply a password with the initial NET USE command. Maybe it will prompt you.

Code: Select all

H:\>net use * "\\Server\Share" /user:Squashman
Enter the password for 'Squashman' to connect to 'Server':

Re: WinSCP vs FTP.exe

Posted: 19 May 2014 14:22
by julesverne
Squashman wrote:Well what do you think will happen if you don't supply a password with the initial NET USE command. Maybe it will prompt you.

Code: Select all

H:\>net use * "\\Server\Share" /user:Squashman
Enter the password for 'Squashman' to connect to 'Server':


Right, but this is with a script and I will be passing the pw as a variable into the command. The cmd screen will not be viewable as it will be started from a vbscript from within an hta, using the "hidden" option.

Re: WinSCP vs FTP.exe

Posted: 19 May 2014 15:53
by julesverne
julesverne wrote:
Thanks foxidrive and squashman! I did get this to work. However, how do I stop it and remove the credentials? Popd doesn't work. And I want to force the user to always have to input a pw so I want to remove the credentials after every use. The other immediate reason I want to do all of what I mentioned is to run some speed tests WinSCP vs FTP.EXE vs NET USE combined with ROBOCOPY.


Found my solution here: http://serverfault.com/questions/451387/how-to-delete-cached-temporeraly-credentials-for-a-network-share-on-a-windows-ma#500237

Code: Select all

net use Z: /d
klist purge


Seems to work without having to reboot the computer.

Re: WinSCP vs FTP.exe

Posted: 20 May 2014 03:21
by foxidrive
This sort of thing should work.

Code: Select all

net use z: \\server\share /USER:mehere Secretpassword /PERSISTENT:NO

rem tasks here

net use z: /delete