Post a reply

Options
Add an Attachment

If you do not want to add an Attachment to your Post, please leave the Fields blank.

(maximum 10 MB; please compress large files; only common media, archive, text and programming file formats are allowed)

Options

Topic review

martin

Re: Not able to retrieve file from server to local using WINSCP through python code

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.
vickyRocker

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

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