Hi Team, I am trying to create a simple workflow (vro 8.4 version) in which the first step is to check if there is a specific folder that exists in vro filesystem(/tmp/folder-xyz) or not If yes then create a file inside it(/tmp/folder-xyz/file1.txt). I am using the command class for this purpose.
for creating file:
cmd1 = "touch /tmp/folder-xyz/file1.txt"
command = new Command(cmd1)
command.execute(true)
For directory check
var cmd2 = '[ -d "/tmp/folder-xyz" ] && echo "Directory /tmp/folder-xyz exists."'
command = new Command(cmd2)
command.execute(true)
The directory check command I want to return the above echo statement if it exists but I don't know how to do that. I have tried
command. output = It's not returning anything
command. result = Its always returns 1