Showing results for 
Search instead for 
Did you mean: 
New Member

Save a downloaded file in a folder whose path is stored in a PowerShell output variable

I downloaded a file and I want to save it in a folder. The path of the folder is in a variable `PowerShellOutput5`



The file is downloaded and is saved when the folder is explicitly mentioned. But I want to save the file whose path is in a variable. When the above flow is run, the file is not saved. How to achieve this?


The URI is taken from `PowershellOutput` and `PowershellOutput2` and this works fine. Only the latter part (path of the folder (`PowershellOutput5`)) doesn't work. 

Resolver II
Resolver II



You can use set variable action to create a variable with your custom file path. Then you this variable to save your file.






Hope this helps!.


If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.


New Member

It didn't work. First, I didn't mean that. I already have the value of the path. The folder is dynamically created based on the current month in the flow. So, I cannot specify the full path to the directory explicitly. I already have the full path in the variable `PowershellOutput5` and hence I don't need to set a new variable. Also, I want to download the file with the name received and not any custom name. 

Helpful resources

Microsoft 365 Conference – December 6-8, 2022

Microsoft 365 Conference – December 6-8, 2022

Join us in Las Vegas to experience community, incredible learning opportunities, and connections that will help grow skills, know-how, and more.

Users online (2,086)