Welcome Serena Central users! CLICK HERE
The migration of the Serena Central community is currently underway. Be sure to read THIS MESSAGE to get your new login set up to access your account.

Using special characters in C$SYSTEM command line

Using special characters in C$SYSTEM command line

PROBLEM

A call to C$SYSTEM fails when the command contains special characters like ‘&’:

CALL "C$SYSTEM" USING "START C:\TEMP\MF&2019.XLSX" 225
                GIVING RETURN-VAL

The following error is recieved. Only part of the command is recognized so the file cannot be found.

1.png

 

RESOLUTION

Windows command shell will recognise the ampersand as a special character. An escape character is needed in the command line to enable it to work. For example using the previous command with the escape character will look like this:

CALL "C$SYSTEM" USING "START C:\TEMP\MF^&2019.XLSX" 96
                GIVING RETURN-VAL

Adding the escape character before a command symbol allows it to be treated as ordinary text. This applies to the following characters also:

^ & < > | ‘ ` , ; = ( )

Other characters may require a different escape character, like a backslash, depending on the command line you are executing.

Labels (2)

DISCLAIMER:

Some content on Community Tips & Information pages is not officially supported by Micro Focus. Please refer to our Terms of Use for more detail.
Top Contributors
Version history
Revision #:
7 of 7
Last update:
‎2019-04-26 23:15
Updated by:
 
The opinions expressed above are the personal opinions of the authors, not of Micro Focus. By using this site, you accept the Terms of Use and Rules of Participation. Certain versions of content ("Material") accessible here may contain branding from Hewlett-Packard Company (now HP Inc.) and Hewlett Packard Enterprise Company. As of September 1, 2017, the Material is now offered by Micro Focus, a separately owned and operated company. Any reference to the HP and Hewlett Packard Enterprise/HPE marks is historical in nature, and the HP and Hewlett Packard Enterprise/HPE marks are the property of their respective owners.