🧡 Skip to main content🔍 Skip to search
Thomas UnderwoodBy Thomas Underwood 🕗 Updated on January 27, 2023 at 8:00 am

While path and filename inputs of all Actions of Automation Workshop are handled automatically, the Run CMD Command Action requires the use of "double quotes" when specifying the command line (in a similar manner as double quotes are used in the Windows command prompt itself).

History

Since introduction of long filename (LFN) support, it became possible to use not only file names longer than 8 characters, but also many of previously disallowed characters. Being a progressive shift and allowing much better organization of files and folders, long file names also posed some challenges…

For example, previously disallowed space character which was used exclusively as a separator character now is allowed as a part of file name. Which in turn requires a different method of separation between file names and parameters.

Spaces & quotes

Now, whenever, a file name or path contains space characters, it is necessary to use double quotes to delimit file names (as well as command line parameters when they contain space characters). The use of quotes is optional in cases when no space characters are involved.

Run CMD Command & long file name usage

Run CMD Command Action automatically adds double quotes to file name input (e.g., when the browse button is used). However, there are essential situations when deciphering the intended syntax is not even remotely possible; e.g., invoking a command in command line (using the Run CMD Command Action).

Due to very design of file naming schemes and their processing, it is not possible to automatically deal with ambiguities inherent in command line specifications.

Example

Example of C:\test case\my file.bat string that could potentially be delimited as…

  • "C:\test" "case\my" "file.bat" · runs test with params case\my and file.bat
  • "C:\test" "case\my file.bat" · runs test with param case\my file.bat
  • "C:\test case\my" "file.bat" · runs my with param file.bat
  • "C:\test case\my file.bat" · runs my file.bat without any parameters
Success. Congratulations!

Summary

It is evident, thus, that a correct specification of parameters requires a necessary disambiguation of the command line input by quote delimiting the elements appropriately. Even more, such disambiguation can not be accomplished automatically on the basis of formal processing of command line input.

Run more?

Seamless automation in action! 90 seconds to efficiency.

Ask for more…

If you have any questions, please do not hesitate to contact our support team.