SFTP Net Drive 2017
SFTP Net Drive 2017
Questions / Feedback?

Command Line

SFTP Net Drive command line syntax


SftpNetDrive.exe [command] [{/|-}parameter[:value[,value...]]
                            [{/|-}parameter[:value[,value...]]...]]

Parameters can start with / or -. Some parameters are general, they can be used with all commands or without a command. Other parameters are command-specific as explained below.

Command list

  • start - connect the specified profile.

    Command parameters:

    • profile (mandatory) - name of the profile to use.
      Example:
      SftpNetDrive.exe start /profile:"My Office Server"
    • log (optional) - start in detailed log mode.
      Examples:
      SftpNetDrive.exe start /profile:"My Office Server" /log

      Log files will be written to %LOCALAPPDATA%\SftpNetDrive.

    • fork (optional) - if specified, the program starts another instance of itself, waits until that instance connects the profile and exits when the profile is connected or an error occurred. Otherwise the program remains running until its stopped manually or with stop command.
      Example:
      SftpNetDrive.exe start /profile:"My Office Server" /fork
    • timeout (optional) - timeout in seconds to wait for connection if the fork parameter is specified. Allowed interval is from 1 to 300 seconds. If no timeout specified, the maximum allowed value is used.
      Examples:
      SftpNetDrive.exe stop /profile:"My Server" /fork /timeout:120
  • stop - disconnect the specified profile.

    Command parameters:

    • profile (mandatory) - name of the profile to use.
      Example:
      SftpNetDrive.exe stop /profile:"My Office Server"
    • wait (optional) - if specified, the program exits when the profile is disconnected. Otherwise the program sends a message to the instance with the specified profile connected and exits immediately.
      Example:
      SftpNetDrive.exe stop /profile:"My Office Server" /wait
    • timeout (optional) - timeout in seconds to wait for disconnection. Allowed intervals range from 1 to 300 seconds. If not specified, the maximum timeout (300 seconds) is set.
      Example:
      SftpNetDrive.exe stop /profile:"My Server" /wait /timeout:120
  • new - creates a new profile with the settings specified in the parameters.

    Command parameters:

    • profile (mandatory) - name of new profile. The name is not case sensitive.
      Example:
      /profile:"My new server"
    • server (mandatory) - host name or IP address of the server.
      Examples:
      /server:"ssh.mydomain.com"
      /server:"::1"
      /server:"192.168.10.43"
    • port (optional) - server port number if it differs from the standard 22. Allowed values are from 1 to 65535.
      Example:
      /port:2222
    • login (optional) - username to be used when logging in to the server. If no login specified, it will be asked each time the profile is being connected.
      Example:
      /login:"crazyuser"
    • password (optional) - password to be used when logging in to the server. If no password specified and no other authentication parameter (key nor token) specified, the program will ask for the password each time the profile is being connected.
      Example:
      /password:"my password"
    • nosavepwd (optional) - signifies that the user shouldn't be able to save their password. Specifying this option will force the user to enter their password each time the profile is being connected, and will prevent them from saving it by disabling UI elements.
      Example:
      /nosavepwd
    • key (optional) - pathname of the ssh-key to be used when logging in to the server.
      Example:
      /key:"C:\My Data\id_rsa"
    • keypassword (optional) - password of the key file if it is password protected. Makes sense only of the key param is also specified.
      Example:
      /keypassword:"my key password"
    • authagent (optional) - use authentication agent. Now PuTTY Agent (Pageant) and SSH-Agent from Cygwin are supported.
      Example:
      /authagent
    • letter (optional) - drive letter to assign to the created virtual disk. If no drive letter specified, the last available drive letter will be used.
      Allowed values:
      • first - use the first available drive letter
      • last - use the last available drive letter
      • a-z - use the particular drive letter
      Examples:
      /letter:last
      /letter:s
    • type (optional) - specifies the drive type to be created. If no drive type specified, the drive will be created as a network drive. This option is not necessary if /folder is specified.
      Allowed values:
      • network - the drive will be a network drive; it looks like a mapped shared network folder
      • fixed - the drive will be a fixed drive; it looks like one more hard drive connected
      • removable - the drive will be a removable drive; it looks like a flash card or a USB flash token connected
      Example:
      /type:removable
    • folder (optional) - path to a existing, empty folder to mount the drive to. This option may be used instead of /letter; it will be ignored if that option is specified.
      Example:
      /folder:"C:\Mounts\MyProfile"
    • access (optional) - specifies if the drive will be visible to all the users logged in to the computer.
      Allowed values:
      • public - the drive will be visible to all the users
      • private - the drive will be visible only to the user who launched the program
      Example:
      /access:private
    • root (optional) - specifies the folder on the server to be used as a root folder of the drive. If no root folder specified, the user's home folder will be used.
      Allowed values:
      • home - use the user's home folder on the server
      • root - use the server root folder
      • <folder name> - use the specified folder
      Examples:
      /root:root
      /root:"/Incoming/Documents"
    • open (optional) - specifies the folder on the drive to be opened in Windows Explorer on drive connect and on double click on the tray icon. Use the off value to do not open Windows Explorer on profile connect. On double click the drive root folder will be opened.
      Examples:
      /open:"\Documents\2012\09"
      /open:off
    • nocache (optional) - specifies if file information of file content must not be cached. If the param or its value are not specified, both caches are turned on.
      Allowed values:
      • info - don't cache files information
      • content - don't cache files content
      Example:
      /nocache:info,content
    • dotnames (optional) - specifies if files with names started with dot will be marked hidden. If the param is not specified, such files are not marked with Hidden attribute.
      Allowed values:
      • on - show files with names started with dot
      • off - mark such files with Hidden attribute
      Example:
      /dotnames:off
    • renametarget (optional) - specifies if the program has to use so called "rename workaround" if the target file already exists and the server fails to simply move the original file to the existing one.
      Allowed values:
      • on - sets to use the workaround if it fails to move a file into the existing one
      • off - sets to report an error if it fails to move a file into the existing one
      Example:
      /renametarget:on
    • readonly (optional) - specified to mount the drive in read-only mode. If the param is not specified, its value assumed to be off.
      Allowed values:
      • on - mounts the drive as read-only
      • off - mounts the drive with full access
      Example:
      /readonly:on
    • winspecials (optional) - specifies is Windows special files (such as desktop.ini, autorun.inf, folder.jpg, etc.) should be requested from the SFTP server. If you don't use such files, it's a good idea to disable these requests. In this case, the program will report "file not found" result to Windows without sending requests to the SFTP server. This will reduce amount of requests made to the SFTP server and speed up folders listing. If the param is not specified, such files are requested from the server each time Windows wants them.
      Allowed values:
      • on - Windows special files are allowed
      • off - Windows special files are disabled
      Example:
      /winspecials:off
    • timeout (optional) - timeout interval in seconds to wait for data from the server. Allowed values are from 5 to 300 seconds. Default value is 30 seconds. Use the off value in order to wait forever.
      Examples:
      // Drop the connection after 2 minutes (120 seconds) of waiting for data from the server
      /timeout:120
      // Drop the connection only if the Winsock layer returns an error
      /timeout:off
    • ignorefterrors (optional) - If enabled, any errors which occur when attempting to update file times will be ignored. By default, file time errors are not ignored.
      Allowed values:
      • on - File time errors are ignored
      • off - File time errors are not ignored
      Example:
      /ignorefterrors:on
    • ipv6 (optional) - specifies if IPv6 address must be preferred when resolving the server host name. By default IPv4 addresses are used.
      Allowed values:
      • on - use IPv6 address
      • off - use IPv4 address
      Example:
      /ipv6:on
    • reconnect (optional) - specifies the number of reconnecting attempts when the connection is dropped. Allowed values for the attempts number range from 1 to 100. Use the off value in order to suppress the reconnection. If the param is not specified, no reconnection attempts will be made.
      Examples:
      /reconnect:3
      /reconnect:off
    • keepalive (optional) - specifies the period in minutes of inactivity time when the program has to send a "keep alive" in order to prevent disconnection by the server software. Allowed values range from 1 to 120 minutes. Use the off value to disable the keep-alives.
      Examples:
      /keepalive:30 // Send "keep alive" every 30 minutes of inactivity
      /keepalive:off
    • sftpversions (optional) - specifies version(s) of SFTP protocol to be used. Allowed values range from 2 to 6. If not specified, protocol versions from 3 to 6 are allowed.
      Examples:
      /sftpversions:4,5,6 // Allow to use only SFTP versions 4, 5, and 6
      /sftpversions:3 // Allow to use only SFTP version 3
    • charset (optional) - specifies the charset name to be used to convert file names. Use the default value to allow the program to use the charset specified by the server software (if it supports this extension). If the param is not specified, its value assumed to be default.
      Examples:
      /charset:default
      /charset:utf-8
    • compression (optional) - specifies whether compression has to be used when transferring data to the server and vice versa. Allowed values are from 1 (the lowest compression level but the fastest speed) to 9 (the highest compression level but the slowest speed). Use the off value to turn the compression off. If the param is not specified the maximum compression level is used.
      Examples:
      /compression:9
      /compression:off
    • queryspace (optional) - specifies whether the program has to query the server for total and free space available to the user. If the server software does not support this feature, it's a good idea to turn this setting off.
      Examples:
      /queryspace:on
      /queryspace:off
    • exclusivemode (optional) - specifies if files on the SFTP server should be opened in exclusive mode. In this case, if you open a file, no other user can open the same file on the server until you close it. If the param is not specified exclusive mode is not used.
      Example:
      /exclusivemode:on
    • compatible (optional) - specifies whether so called "compatibility mode" has to be used. In this mode the program uses SFTP v3 only, turns off compression, reduces encryption algorithms to DES and Triple DES only, key exchange algorithm is only DH, MAC algorithms are limited to HMAC-MD5 and HMAC-SHA1, public key algorithms allowed are RSA and DSS.
      Allowed values:
      • on - use compatibility mode
      • off - do not use compatibility mode
      Example:
      /compatible:on
    • serverkey (optional) - specifies how the server key has to be handled. If the param is not specified, the program will ask the user on first connect to the server to accept the received server key.
      Allowed values:
      • <filename> - path name of the file containing a public server key
      • accept - makes the program to accept any key received from the server on first connect
      • any - makes the program to accept any key received from the server, even if the received key differs from the trusted one stored in the profile (Not secure! Please be sure you know what you're doing!)
      Examples:
      /serverkey:"C:\My Data\office.pub"
      /serverkey:accept
    • serverpath (optional) - specifies a custom path to the SFTP server software.
      Allowed values:
      • <pathname> - path to the SFTP server software
      • off - don't use custom server software path
      Examples:
      /serverpath:"/usr/lib/sftp-server"
      /serverpath:off
    • proxy (optional) - specifies whether a proxy server has to be used. The supported types of servers are SOCKS servers of versions 4 and 5, and HTTPS proxy servers. If the param is not specified, no proxy server will be used.
      Allowed values:
      • socks4 - the proxy server is a SOCKS v4 server
      • socks5 - the proxy server is a SOCKS v5 server
      • https - the proxy server is a HTTPS proxy server
      • off - do not use proxy server
      Examples:
      /proxy:socks5
      /proxy:https
    • proxyauth (optional) - specifies authentication type to be used for HTTPS proxy server. If the param is not specified, no authentication will be used.
      Allowed values:
      • off - do not use authentication
      • basic - use the basic scheme
      • digest - use the digest scheme
      • ntlm - use NTLM authentication
      Examples:
      /proxy:https /proxyauth:off
      /proxy:https /proxyauth:digest
    • proxyhost (mandatory) - specifies host name or IP address of the proxy server.
      Examples:
      /proxy:https /proxyhost:"coolproxy.mydomain.com"
      /proxy:socks4 /proxyhost:"192.168.100.23"
    • proxyport (optional) - specifies server port number. If the param is not specified, the default port number will be used: 1080 for a SOCKS server, and 3128 for an HTTPS proxy server.
      Example:
      /proxy:https /proxyport:31280
    • proxylogin (optional) - specifies username to be used to authorize on the proxy server.
      Example:
      /proxylogin:"crazyproxy"
    • proxypassword (optional) - specifies password to be used to authorize on the proxy server.
      Example:
      /proxypassword:"mycoolpassword"
  • set - modifies the specified profile by applying values from the specified parameters. Parameters are the same as described in the new command except for the following difference:
    • profile (mandatory) - name of the profile to be changed. If a parameter is used with no value, the existing value will be removed from the profile.
      Examples:
      // Set root folder of the disk to the server's root
      SftpNetDrive set /profile:"My new server" /root:root
      // Remove the stored server key info so that the user will be asked to accept or
      // decline the received server key on the next connect.
      SftpNetDrive set /profile:"My new server" /serverkey
  • delete - deletes the specified profile.

    Command parameters:

    • profile (mandatory) - name of the profile to be deleted
      Example:
      SftpNetDrive delete /profile:"My new server"

 
 
Copyright (c) 2019 /n software inc. - All rights reserved.
SFTP Net Drive 2017 - Version 17.0 [Build 6977]