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

Author Message
[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\ /command "open s" "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.

[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 via cmd anyway. Run it directly.

You can post new topics in this forum


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!


About donations

$9   $19   $49   $99

About donations


WinSCP Privacy Policy

WinSCP License