Folder path separator

0 votes
asked Apr 30 by Prabhakar (470 points)

While using SFTP, which character should be used in path - Forward slash or backward slash ? For e.g. a/b/c or a\b\c
Does it make a difference in SFTP server running in Windows or Linux?

Applies to: Rebex SFTP

1 Answer

0 votes
answered Apr 30 by Lukas Pokorny (100,670 points)

Rebex SFTP implements SFTP v3 and v4. In both of these versions, Unix-line paths with forward slashes and a single root at "/" is to be used:

   This protocol represents file names as strings. File
   names are assumed to use the slash ('/') character as
   a directory separator.

   File names starting with a slash are "absolute", and
   are relative to the root of the file system. Names
   starting with any other character are relative to the
   user's default directory (home directory).

Some Windows-based servers accept backslashes as well, but relying on that behavior is strongly discouraged (and not needed because forward slashes work as well).

...