Topic ""/Command" not working"

Author Message
vikas21
[View user's profile]

Joined: 2008-11-28
Posts: 3
Location: Vikas21
Hi,
The following command is not working.
winscp.exe ftp://myftpserver:pwd@ftpserver /command "get 11052008.txt" "exit"

It is doing nothing. Am I doing something wrong above.
My requirement is to use the WINSCP programatically. We want to copy a file from the ftp location to our machine.
Is there any way to do it?
I don't want to use the graphical or the command prompt option.

regards
Vikas
Advertisements
martin
[View user's profile]
Site Admin
Joined: 2002-12-10
Posts: 24530
Location: Prague, Czechia
/command cannot be combined with ftp://...
See documentation.

Use:
winscp.exe /command "open ftp://myftpserver:pwd@ftpserver" "get 11052008.txt"
_________________
Martin Prikryl
vikas21
[View user's profile]

Joined: 2008-11-28
Posts: 3
Location: Vikas21
Thanks , it worked.
vikas21
[View user's profile]

Joined: 2008-11-28
Posts: 3
Location: Vikas21
Now when this command is working, I am able to get the file, but when the same command is repeated then it doesn't overwrite the existing file already present.
Is there any "force" parameter that we can specifiy ? when "GET" is used.
martin
[View user's profile]
Site Admin
Joined: 2002-12-10
Posts: 24530
Location: Prague, Czechia
vikas21 wrote:
Now when this command is working, I am able to get the file, but when the same command is repeated then it doesn't overwrite the existing file already present.
Is there any "force" parameter that we can specifiy ? when "GET" is used.

Please read documentation. If that does not help, come back.
_________________
Martin Prikryl
Advertisements

You can post new topics in this forum






Search Site

What is WinSCP?

It is award-winning SFTP client, SCP client, FTPS client and FTP client integrated into one software program for file transfer to FTP server or secure SFTP server. [More]

And it's free!

Donate

About donations

$9   $19   $49   $99

About donations

Recommend

WinSCP Privacy Policy

WinSCP License