WinSCP using script to SFTP to Cygwin + task scheduler

Advertisement

Madcliker08
Guest

WinSCP using script to SFTP to Cygwin + task scheduler

Hello,

I am trying to SFTP from WinSCP to Cygwin into a sub-directory in the users home folder.

I want the file being sent to go into a subdirectory within the /home/user folder.

I do have the users locked int their home directory as in they can't back out, but they can create new subdirectories

Here is what I am using at the moment in my script. I have tried adding cd,lsd you name it, between open and put commands, nothing works.

open sftp://user:**********@1.1.1.1/

put c:\script\5.txt

exit

I can't get the file to go into any other directory within the users' home.

I would like the file to go into user\FTP




Thank you in advance!

Reply with quote

Advertisement

martin
Site Admin
martin avatar
Joined:
Posts:
41,390
Location:
Prague, Czechia

Re: WinSCP using script to SFTP to Cygwin + task scheduler

Can you upload the files in WinSCP GUI?

This should work, if I understand your problem:
put c:\script\5.txt /user/FTP/

Reply with quote

Advertisement

You can post new topics in this forum