Pac Display Applications

I am simply trying to use applications manager to open a cmd.exe window and then send it a command string via a string varable. I have tried every possible version of this and it acts as though the string is not being sent.

The whole purpose is to simply copy a file from one location to another and rename the file at the same time. The string I used in a cmd.exe window that worked as expected is: copy /y “C:\Users\barre\Documents\APLI - Sensia\Log Files\Datafile.csv” “C:\Log File\Log.csv”.

Then I entered cmd.exe with a space at end into the command line and entered the string var name for the copy command. See Pic.
The string in SoftPac:Log_DataFileCmdString is: copy /y “C:\Users\barre\Documents\APLI - Sensia\Log Files\Datafile.csv” “C:\Log File\Log.csv”

The command window does open, but only the command prompt with no indication it ever got the string.

Ok, well it is not so obvious a solution, unless you already use cmd line a lot.

Turns out, the only way this works is to use a cmd.exe switch such as /C. In fact, what I described I was trying to do works perfect with this switch, because it also closes the cmd window.

You have to enter cmd.exe /C and then an additional space. Next enter the string variable to use in the append string box and set a trigger. When you run it, the cmd window “blips” and whala there is the file in the correct folder.

Here is the string I sent: copy /y “C:\Users\barre\Documents\APLI - Sensia\Log Files\Datafile.csv” “C:\Log File\Log.csv”

Applications 2

1 Like

Ok, for all those who plan on using cmd.exe in the applications manager, that particular command requires that you use a switch with it (in the command line as shown) if you want to use the Append String, otherwise, it will open the command window, but the Append String will not be sent.
Also, be sure and use a space after the switch.

1 Like