Please review and I am open to any changes including fixing the problem on the first task while reading the csv file.
Background statement
I have created task that runs a vbs script that outputs into a csv file. then the task runs appendfile script that reads that file into a txt file formatted as shown below example into the following directory C:\Program Files (x86)\BigFix Enterprise\BES Client\Patches\installedpatch]
Exerts from Task
appendfile Installed Patches: {concatenation “;” of elements of (set of lines of file “C:\BigFixScripts\installpatch.csv”)}
move __appendfile "{parameter “filename2”}"
copy “{parameter “filename2”}” “{(parent folder of client as string & “\Patches”)}\installwindowpatchfile.yesterday.txt”
Example output file text.
Installed Patches: ;Command line options are saved.;ITEMSERVER,Cumulative Security Update for ActiveX Killbits for Windows Server 2008 x64 Edition (KB2508272),6/28/2011 8:54:02 PM;ITEMSERVER,Cumulative Security Update for ActiveX Killbits for Windows Server 2008 x64 Edition (KB2618451),12/16/2011 2:26:15 PM;
Requested Change
Customer needs me to remove from the txt file the “Command line options are saved.” from the file.
I have created another task for testing that runs the following commands
delete __appendfile
delete __createfile
// start a new __createfile
// Begin the new __createfile removing Command line options are saved line
// Conclude the new __createfile with every line from the original file that does not start with Command line options are saved.
createfile until EOF
{concatenation “%0d%0a” of lines whose (it does not start with “Command line options are saved.”) of file (parent folder of client as string & “\Pathces\installwindowpatchfile.yesterday.txt”)}
EOF
// Now delete the original file
delete “{parent folder of client as string & “\Pathces\installwindowpatchfile.yesterday.txt”}”
//Replace the original file with the new file
move __createfile “{parent folder of client as string & “\Patches\installwindowpatchfile.yesterday.txt”}”
Log file message
Relevant - fix windows install file issue 08162017 (fixlet:5953)
At 08:18:56 -0700 -
ActionLogMessage: (action:5953) Action signature verified for Execution
ActionLogMessage: (action:5953) starting action
At 08:18:56 -0700 - actionsite (http://itemserver.training.tivoli.edu:52311/cgi-bin/bfgather.exe/actionsite)
Command succeeded delete No ‘C:\Program Files (x86)\BigFix Enterprise\BES Client__BESData\CustomSite_NERC_CIP_V5__appendfile’ exists to delete, no failure reported (action:5953)
Command succeeded delete __createfile (action:5953)
Command failed (Substitution failed while writing file) createfile until EOF (action:5953)