Unable to use backslashes (\) as directory separator in paths; 501 Syntax error in parameters or arguments


THE INFORMATION IN THIS ARTICLE APPLIES TO:

  • EFT, v7.x and later
  • EFT v4.x to v7.4.x stores advanced properties in the registry.
  • EFT v8.x stores Advanced Properties in a JSON file.

When you upgrade from EFT v7.4.x to EFT v8, the non-default settings that you have defined in the registry will be added to the Advanced Properties file during upgrade. (Default settings become part of the EFT configuration files.) For a more on how to use advanced properties, and a spreadsheet of the advanced properties, please refer to the "Advanced Properties" topic in the help for your version of EFT.

SYMPTOM

Unable to use backslashes (\) as directory separator in paths, causing a "501 Syntax error in parameters or arguments" error message.

RESOLUTION

Add the advanced property described below:

ReplaceBackslashWithSlashInPathsForFTP

Values:

1 (true) = enabled; that is, backslashes (\) in paths are replaced with forward slashes (/)

0 (false) = disabled

Default = 0

It may be necessary to restart the EFT server service.

In EFT v8 and later:

Add the name:value pair to the AdvancedProperties.JSON file in EFT's \ProgramData\ directory.

{
"ReplaceBackslashWithSlashInPathsForFTP": "true"
}

In versions prior to v8.0:

Create the registry entry described below.

32-bit:

HKEY_LOCAL_MACHINE\Software\GlobalSCAPE Inc.\EFT Server 7.0\

64-bit:

HKEY_LOCAL_MACHINE\Software\WOW6432Node\GlobalSCAPE Inc.\EFT Server 7.0\

MORE INFORMATION

The SFTP specification (https://tools.ietf.org/html/draft-ietf-secsh-filexfer-02) says: "File names are assumed to use the slash ('/') character as a directory separator." EFT v6.5 does not precisely follow the RFC in this regard and allows using a backward slash ('\') as directory separator.

EFT 7.0 and later work according to the RFC. We've implemented this registry key to make EFT v7.x and later work the same way as v6.5 for backward compatibility.