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 / CMD session: Command w...
Power Automate
Answered

CMD session: Command with %%

(0) ShareShare
ReportReport
Posted on by Microsoft Employee

Hey,

 

I am having trouble with an command, that I use in another RPA tool with CMD.

The command has two percentage signs %%, and when I use this in Power Automate, it thinks that is has to look for a variable.

 

I have tried to use string(' ') without any luck.

Not sure how to fix this. Any help would be greatly appreciated :).

 

hassan14a_0-1645167860554.png

 

 

I have the same question (0)
  • Verified answer
    Henrik_M Profile Picture
    2,021 Super User 2024 Season 1 on at

    Write %%username%% in your command.

  • MichaelAnnis Profile Picture
    5,727 Moderator on at

    @Henrik_M Nailed it. A single percentage sign is used as a variable identifier. The first one starts it and the second one ends it. That’s the easy one, but there are other characters that have to be escaped depending on the action you are using. If you ever feel like PAD is changing your text, then there is an ESCAPE TEXT action that will take care of this, so, if I have %Textvariable% that I know has a % sign in it, and I want to escape it:

     

    Escape text %TextVariable% to %EscapedText% then I can use %EscapedText% where I was using the %TextVariable% and it will be altered so PAD doesn’t mess it up. 

  • Community Power Platform Member Profile Picture
    Microsoft Employee on at

    Hi guys,

     

    Thanks for the tips.

    EDIT: My bad. %% did work. I accidentally had an ekstra ' inserted.

     

    But Regarding the Escape test, then unfortunately it does not seem to work with %username%, it still thinks that username is a variable.

     

    hassan14a_2-1645175321134.png

     

     

     

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

Season of Sharing Community Challenge Winners!

Congratulations to our community stars!

Kudos to our 2025 Community Spotlight Honorees

Expanding mentorship, skilling, and AI innovation

Congratulations to the July Top 10 Community Leaders!

These are the community rock stars!

Leaderboard > Power Automate

#1
David_MA Profile Picture

David_MA 282 Super User 2026 Season 2

#2
trice602 Profile Picture

trice602 159 Super User 2026 Season 2

#3
11manish Profile Picture

11manish 146 Super User 2026 Season 2

Last 30 days Overall leaderboard