Issue in passing filepath

“C:\Users\pras\OneDrive - Spacetree\Documents\UiPath\Shell\Data\Input\Shell_Json.ps1”

while passing the above path i am getting following error due to space between onedrive - spacetree, i tried passing in double quotes and as well as in variable, still issue persists

Invoke Power Shell: The term ‘C:\Users\prasade\OneDrive’ is not recognized as a name of a cmdlet, function, script file, or executable program.
Check the spelling of the name, or if a path was included, verify that the path is correct and try again.

is the isScript option ticked on?

Yes…

try the following:

"""C:\Users\pras\OneDrive - Spacetree\Documents\UiPath\Shell\Data\Input\Shell_Json.ps1"""

now i am not getting any error, but i am not sure if even script is getting executed or not, getting filepath in the output variable:

just to introduced what we did. As the Path contained spaces we surrounded it with ". For defining the inner strings we have to escape it with another. Therefore we used 3 x " on the begin / end

it is a matter of the script design and and you can edit the script e.g. by returns / outputs.

However this is not the scope of the topic and the origin topic is answered and can be closed by:
Forum FAQ - How to mark a post as a solution - News / Tutorials - UiPath Community Forum

Hi @devasaiprasad_K

Please refer this and see if it works
How to Integrate PowerShell with UiPath- Step by Step guide - News / Tutorials - UiPath Community Forum

1 Like

This topic was automatically closed 3 days after the last reply. New replies are no longer allowed.