Hopefully a simple scripting question

Advertisement

bcwhiteh
Joined:
Posts:
2
Location:
Charlotte, NC

Hopefully a simple scripting question

Greetings,

Here is my script...

winscp.com /script="d:\sftpscript.txt"

and sftpscript.txt contains:

open username:password@server:port -hostkey="hostkey" -timeout=60 -passive
cd /dir1/dir2




What I want to be able to do is perform the "cd /dir1/dir2" line, or change the remote directory in either the opening "winscp.com" line of the script or the "open" line of the script. Is there either a parameter or argument I can add when I open the connection that will set my working remote directory for me? Thanks!

Reply with quote

Advertisement

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

Re: Hopefully a simple scripting question

May I know, what do you do not like about using "cd" command?

Anyway, the answer is:
open username:password@server:port/dir1/dir2

Reply with quote

bcwhiteh

It's because a previous developer put most of the winscp syntax into a dll, which I don't want to pull out and change, hehe. However, that works... thanks!

Reply with quote

Advertisement

You can post new topics in this forum