Topic "Hopefully a simple scripting question"

Author Message
bcwhiteh
[View user's profile]

Joined: 2012-04-03
Posts: 2
Location: Charlotte, NC
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!
martin
[View user's profile]
Site Admin
Joined: 2002-12-10
Posts: 24530
Location: Prague, Czechia
May I know, what do you do not like about using "cd" command?

Anyway, the answer is:
open username:password@server:port/dir1/dir2
_________________
Martin Prikryl
bcwhiteh
[View user's profile]

Joined: 2012-04-03
Posts: 2
Location: Charlotte, NC
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!
Advertisements

You can post new topics in this forum






Search Site

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!

Donate

About donations

$9   $19   $49   $99

About donations

Recommend

WinSCP Privacy Policy

WinSCP License