Execute Command Powershell doesn't recognize variables saved by another shell script output

Hello,

I had a few steps which was capturing the some file names for a folder using a shell script command. The first step was getting the path variable and then passing it into another shell command. However after we upgraded to 10.3.16 the variable captured by the shell command no longer recognized in the other shell command (even it's captured part of the variables). When setting the variable by the actual text, then it works when passing it to the shell command.

Screenshot with variable from the shell command:

Screenshot when having variable assigned by direct text:

0
5 comments
Avatar
Firas Khalili

Hi Hasib,

Thank you for creating a post. We are aware of this issue and it will be fixed in an upcoming release.


Regards,
Subject7 Team

0
Comment actions Permalink
Avatar
Hasib Rostaiee

Thank you Firas, is there any workaround for it? I tried assigning the variable got from the command to another variable and then use it in another command, but that also doesn't work.

0
Comment actions Permalink
Avatar
Firas Khalili

Hi Hasib,

Please try the below OS command and let me know how it goes

Get-ChildItem -Path $env:USERPROFILE\Downloads | Sort-Object LastWriteTime -Descending | Select-Object -First 1 | ForEach-Object { $_.Name }


Regards,
Subject7 Team
0
Comment actions Permalink
Avatar
Hasib Rostaiee

Thank you, that works for the Execute command. 

Seems like the variable also is not working when using in VERIFY_DOWNLOAD command, and mybe someo ther commands.

0
Comment actions Permalink
Avatar
Firas Khalili

Hi Hasib,

Glad it is working! Yes, as I mentioned earlier we are aware of this behavior, and it will be fixed in an upcoming release. 


Regards,
Subject7 Team

0
Comment actions Permalink

Please sign in to leave a comment.