web
You’re offline. This is a read only version of the page.
close
Skip to main content

Announcements

News and Announcements icon
Community site session details

Community site session details

Session Id :
Power Platform Community / Forums / Power Automate / Getting folder path as...
Power Automate
Answered

Getting folder path as multiline text

(0) ShareShare
ReportReport
Posted on by 77

pranavj619_2-1670826675992.png

 

 

 

Here, I have used CMD output to get the machine name....and passing that variable into a string...but, I'm getting the folder path as multiline text which is why it is getting error while reaching to the file location...any idea how to get the text in single line....I tried trim but it is giving the same output

I have the same question (0)
  • VJR Profile Picture
    7,635 on at

    @pranavj619 

    Make sure to use the Trim text on the variable that gets the machine name (and not on the entire text with path).

    I have checked it that way and its giving the right output. (Without Trim it was giving a newline.)

     

    Tip: You can also use "Run DOS command" and give command as hostname to get the machine name without creating a CMD session. Even this command gives a newline so had to use Trim.

     

  • Verified answer
    Prabu Profile Picture
    55 on at

    Hi @pranavj619 

     

    If you're trying to get machine name from Power Automate Desktop - You can use "Get windows environment variable" action to get the computer name, instead of CMD script 

    prabut_1-1670841734401.png

     

     

     

  • pranavj619 Profile Picture
    77 on at

    using the username variable I'm getting the expected string..thanks

Under review

Thank you for your reply! To ensure a great experience for everyone, your content is awaiting approval by our Community Managers. Please check back later.

Helpful resources

Quick Links

Introducing the 2026 Season 1 community Super Users

Congratulations to our 2026 Super Users!

Kudos to our 2025 Community Spotlight Honorees

Congratulations to our 2025 community superstars!

Congratulations to the April Top 10 Community Leaders!

These are the community rock stars!

Leaderboard > Power Automate

#1
Vish WR Profile Picture

Vish WR 664

#2
Haque Profile Picture

Haque 460

#3
Valantis Profile Picture

Valantis 357

Last 30 days Overall leaderboard