Using Spaces in File Names

Newer versions of Windows allow the use of long file names that can include spaces. If any of the folder or file names used on the command line contain spaces, you must enclose the path in quotes or remove spaces and shorten longer names to eight characters.

Using Quotes

In the example below, the path specifying the location of the BarTender application contains spaces (it is located in the Program Files directory). When using quotes, you should enclose the entirety of the path and/or file name in quotation marks.

"C:\Program Files\BarTender Suite\bartend.exe" /F=C:\Address.btw /X

Removing Spaces

You can enter a command line parameter that references directory and file names with spaces without using quotes by removing the spaces and shortening the names to eight characters. To do this, add a tilde (~) and a number after the first six characters of each directory or file name containing a space. In the example below, the path specifying the location of the BarTender application contains spaces (it is located in the Program Files\BarTender Suite directory). The spaces have been removed, and the names shortened to just one word.

C:\Progra~1\BarTen~1\bartend.exe /F=C:\Address.btw /X

Related Topics