Skip to content

SSH.SFTPSession.WorkingDirectory

Andrew Lambert edited this page Nov 26, 2022 · 8 revisions

SSH.SFTPSession.WorkingDirectory

Property declaration

 Dim WorkingDirectory As String

Remarks

Gets and sets the current working directory for the SFTP session. Paths that begin with a slash (/) are interpreted as absolute paths. Paths without a leading slash are interpreted as being relative to the current working directory.

Defaults to /home/username/, where username is the name used to authenticate to the server. If that directory doesn't exist on the server then the default working directory is /.

Attempting to set the WorkingDirectory to a file or to a directory which doesn't exist will fail.

You can change to the parent directory by assigning a value of .. to this property.

When setting a new working directory, the tilde character (~) will be expanded to /home/username if it appears at the beginning of the path.

Clone this wiki locally