I don't think it is possible, but I want to see if I am missing something. We are using Connector to extract data off of a screen and then write it out to a text file for another program to use. We are using Connector to call cmd.exe and pass the variables needed to create the text file and put the data into it.
Windows variables I am trying to use:
Date - %Date%
Time - %Time%
For example, we use the following to launch the external application. This works well but doesn't have the date or time we need for the process.
Program:
c:\windows\system32\cmd.exe
Arguments:
/c echo DATA THAT GOES IN THE TEXT FILE >> C:\ProgramData\MVi\RCS\incoming\receipt.txt
This works correctly since there are no date or time tokens in the string.
We have tried using the following arguments, but the date or time tokens don't get evaluated with Connector and the file does not get created. Doesn't matter if we use the tokens in the file name OR in the data that goes into the file. However, if we run them from the windows run line or batch file the file gets created and named correctly.
Arguments:
/c echo WHAT YOU WANT IN THE FILE >> C:\ProgramData\MVi\RCS\incoming\receipt_%time:~0,2%%time:~3,2%%time:~6,2%%time:~9,2%.txt
Here is the command line that works correctly when running from the Windows run box or batch file.
c:\windows\system32\cmd.exe /c echo Date- %Date% %time:~0,2%%time:~3,2%%time:~6,2%%time:~9,2% WHAT YOU WANT IN THE FILE >> C:\ProgramData\MVi\RCS\incoming\%time:~0,2%%time:~3,2%%time:~6,2%%time:~9,2%.txt
Thoughts on ways to get Connector to use the tokens?