Hi
I've configured a simple RunCmd tool in Designer to run a powershell script.
The script simply writes some text to the console when launched.
Is there a tool I can use to capture the console output of the RunCmd tool ?
Regards
Suki
add the output path at the end of your script like
your_command > output.log
In powershell you can also do
Start-Transcript -Path "C:\Logs\script_log.txt"
# Your script commands here
Get-Service
Write-Output "Script completed."
Stop-Transcript
Cool, I can dump the console output to a text file.
Is there a tool to view flat files (.txt)? I 've got it wired to the browse control which kind of assumes the data is tabular oriented.
Was looking for something that just display the text in free form (raw)
free form as in?
notepad is what i will use to see it, if thats what you are asking.
By freeform, do you mean in one cell? The characters that define the new line in your output are creating a new line unless you specify it not to. Maybe try \0 as the delimiter in the input.
Otherwise, just use a summarise straight afterwards, to concatenate the field using \n as the delimiter.
Yes effectively like notepad.exe but displayed in the results panel.
You could use the action to copy header + rows and paste into notepad.exe but it gives you warning below, which mean's the output copied is not consistent with the results pane.
Read it as csv with delimiter \0 or flat file and select delimiter as \0. Increase the column content width to 5000+
then you will have all your data in a single cell.
@gillsuk, that notification is because you are trying to copy from the "Browse Anywhere", on the node of the tool, rather than from a browse. The node will only show a sample of the data (by default 1MB, with max size of 256 characters), hence the message that it may have truncated data. Use a browse to copy from if you want to guarantee.