0

From Lauterbach command console when I execute the following instruction then a directory is created. But when I include the same line in a cmm script, then it fails to create a directory:

os.command mkdir \\execution\v1.0\Test_logs\Shmoo\Modem_VU_New\&sn\VMIN
user3565150
  • 884
  • 5
  • 21
  • 49

1 Answers1

1

In PRACTICE scripts ("cmm scripts") all strings (or sub-strings) starting with a ampersand "&" are macros, which are replaced with the content of the macro. If the macro "&sn" hasn't been created before, it's occurence in any stringt will be replaced with an empty string.

To fix your command create a macro with the name "&sn" which contains the characters "&sn" by concatenating a "&" with "sn" (to prevent macro replacement).

You'll get the following code:

PRIVATE &sn
&sn="&"+"sn"
OS.Command mkdir \\execution\v1.0\Test_logs\Shmoo\Modem_VU_New\&sn\VMIN

By the way: I rather would use the build-in command MKDIR instead of OS.Command mkdir

Holger
  • 3,920
  • 1
  • 13
  • 35