0

in my company , in our user screens which is in windows o.s we do ftp to get file(excel,word,etc..) from server to local or put some files to unix server..now we migrate ftp process to sftp.

current ftp process been coded with "ftp -s:'somepath/ftpFile.txt' ". When user click print or some buttons, code first create ftpFile.txt under C: folder then run it for doing ftp to unix server

ftpFile.txt look like this:

username
password
lcd somepath/
cd someotherpath/
get/put somefile
quit

Now we need to migrate this to sftp . but i can not see '-s' pattern for using file in sftp . How can i do same with sftp?

My 2. question is , Our windows server is 2012 and there is no ssh client installed in it , which ssh client should i install to manage same process with sftp.

Thanks all.

canmurat
  • 159
  • 11
  • 1
    Your question is confusing. On one hand, you are asking for recommendations for Windows SFTP client (what is forbidden on Stack Overflow). On the other hand, you claim that there's no `-s` switch in your particular SFTP client, without mentioning what SFTP client are you looking at. + Are you aware that you cannot just run your (Windows?) `ftp` script in a random SFTP client? You will have to map your `ftp` script commands to specific commands of specific SFTP client you choose. Which one you choose, depends on what you need the script to do. And you didn't tell us anything about your script. – Martin Prikryl Sep 30 '21 at 13:58
  • There are zillions of existing questions here that deal with reimplementing particular FTP scripts/tasks/operations in SFTP. Do some research. Or ask way more specific question. – Martin Prikryl Sep 30 '21 at 14:00
  • @MartinPrikryl Hi. I edited and added script. i just learned that winscp is supported in our company. so my purpose is just like current . i first create a ftpFile.txt and then run it with sftp commands from code. its already like 'ftp -s:path/ftpFile.txt' now i plan to do it ilke 'sftp ...... 'path/ftpFile.txt' . is it clear ? – canmurat Sep 30 '21 at 18:32
  • That's again confusing. So do you want to use WinSCP or OpenSSH `sftp`? Those are two different SFTP clients. + Also your script or commandline is not complete. There's no hostname information there. Either you need to have `open` command in the script or hostname on `ftp` commandline. There's neither in your example. – Martin Prikryl Oct 01 '21 at 05:38

0 Answers0