Topic "Not able to retrieve file from server to local using WINSCP through python code"

Author Message
vickyRocker
[View user's profile]

Joined: 2017-09-14
Posts: 1
Location: USA
I am trying to retrieve a csv file from server using WINSCP through python code -
Here is my command -


s = start /wait cmd /cd C:\dir1\WinSCP\winscp.com /command "open sftp://username:password@hostName.com/" "get /dir1/dir2/dir3/file.csv C:\Users\eclipse-python\project\src\dir1\dir2\ " "exit"

And I am doing os.system(s)

After i execute the command, there is a cmd pop up that appears for a second and then disappears. Also the file.csv is not retrieved.

I
martin◆
[View user's profile]
Site Admin
Joined: 2002-12-10
Posts: 27083
Location: Prague, Czechia
The cmd has no /cd switch. You probably wanted to use /c.

Though it makes no sense to run winscp.com via cmd anyway. Run it directly.
Advertisements

You can post new topics in this forum

Search

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