Created On:  20 April 2011

Problem:

The Bulk Checkout (BCO) tool is returning the following error when using the 'alternate check-out location' (-fp) switch:

Error: Error checking-out file '[filename]': com.starbase.starteam.SDKRuntimeException: [filename] (The filename, directory name, or volume label syntax is incorrect)

Resolution:

This error will usually occur when using the following format (note the -fp switch & filter *.*.* in this example)

bco -p "Administrator:Administrator@CONFIG:50000/project/view" -vb -fp "C:\SCM Working Folders\Project\View\" *.*.*

This will result in the following error;

...
Requesting X files via SDK
Checking out: C:\SCM_Working_Folders\Project\View\*.*.*\First.Draft.txt
Error: Error checking-out file 'C:\SCM_Working_Folders\Project\View\*.*.*\First.Draft.txt': com.starbase.starteam.SDKRuntimeException: C:\SCM_Working_Folders\Project\View\*.*.*\First.Draft.txt (The filename, directory name, or volume label syntax is incorrect)
Return code: 1

The reason for this is error is the backslash at the end of the -fp parameter (before the closing double-quote) is interpreted as an escape-sequence.

The following is an extract from the ST_CmdTools_Help_en.pdf guide.

A backslash ( \ ) is interpreted as an escape character when it precedes quotation marks. As a result, an error occurs in the following example:

bco -p "xxx" -fp "C:\" "*"   which is interpreted as:    bco -p "xxx" -fp "C:" *"
To avoid a situation like this, escape the final character in "C:\" as follows:

bco -p "xxx" -fp "C:\\" "*"

Or avoid it as follows when the -fp path does not end with the root folder as in "C:\orion\"

bco -p "xxx" -fp "C:\orion" "*"

The solution to the problem is to avoid using a backslash at the end of the -fp switch. For example;

-fp C:\SCM_Working_Folders\Project\View *.*.*

or

-fp "C:\SCM_Working_Folders\Project\View" *.*.*

Incident #2511581