FIX: Ampersand (&) Appears as Underscore (_) in the Explorer

Last reviewed: August 25, 1997
Article ID: Q139299
The information in this article applies to:
  • Microsoft Visual SourceSafe for Windows, versions 4.0, 5.0
  • Microsoft Visual SourceSafe for Windows NT, versions 4.0, 5.0
  • Microsoft Visual SourceSafe for Windows 95, versions 4.0, 5.0

SYMPTOMS

The Visual SourceSafe Explorer displays a project or file name with an underscore (_) character. It appears to be a shortcut but does not provide shortcut functionality. The MS-DOS command line shows an ampersand (&) character instead.

RESOLUTION

Do not use files or projects that contain the ampersand (&) character. If there are items that appear this way in the SourceSafe Explorer, then you can easily rename the items by clicking Rename on the File menu. Give the file the same name without the ampersand (&) character.

STATUS

Microsoft has confirmed this to be a bug in the Microsoft products listed at the beginning of this article.

This problem has been fixed in Visual SourceSafe 5.0.

MORE INFORMATION

The way the ampersand (&) character in Visual SourceSafe works is different in the SourceSafe Explorer from the way it works on the command line. In the SourceSafe Explorer, the ampersand (&) character translates into the underscore (_) character. In most Windows programming languages, the ampersand (&) character is used to define a shortcut key to an item. In Visual SourceSafe, the same appears to happen, but no shortcut is available. The MS-DOS command line interprets this character differently and returns the item as a literal ampersand (&) character in the string.

Steps to Reproduce Problem

  1. In the SourceSafe Explorer. create a project $/My&Project.

  2. Notice the ampersand has changed to an underscore under the P in MyProject. This appears to be a standard Windows shortcut.

  3. Press CTRL+P. Notice that nothing happens. The shortcut for MyProject is not active even though there appears to be a valid shortcut defined.

  4. Open an MS-DOS command window.

  5. Type the following on the command line:

          SS DIR $/
    

  6. Notice that the MyProject project shows up as My&Project on the command line.

This may occur on files as well as projects. The file may be renamed from the Visual SourceSafe Explorer to eliminate this problem.
Keywords          : SourceSafe vbwin vss kbenv fixlist5.00 kbbuglist
Version           : 4.0 5.0
Platform          : NT WINDOWS
Issue type        : kbbug
Solution Type     : kbfix


================================================================================


THE INFORMATION PROVIDED IN THE MICROSOFT KNOWLEDGE BASE IS PROVIDED "AS IS" WITHOUT WARRANTY OF ANY KIND. MICROSOFT DISCLAIMS ALL WARRANTIES, EITHER EXPRESS OR IMPLIED, INCLUDING THE WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE. IN NO EVENT SHALL MICROSOFT CORPORATION OR ITS SUPPLIERS BE LIABLE FOR ANY DAMAGES WHATSOEVER INCLUDING DIRECT, INDIRECT, INCIDENTAL, CONSEQUENTIAL, LOSS OF BUSINESS PROFITS OR SPECIAL DAMAGES, EVEN IF MICROSOFT CORPORATION OR ITS SUPPLIERS HAVE BEEN ADVISED OF THE POSSIBILITY OF SUCH DAMAGES. SOME STATES DO NOT ALLOW THE EXCLUSION OR LIMITATION OF LIABILITY FOR CONSEQUENTIAL OR INCIDENTAL DAMAGES SO THE FOREGOING LIMITATION MAY NOT APPLY.

Last reviewed: August 25, 1997
© 1998 Microsoft Corporation. All rights reserved. Terms of Use.