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 / Write text to file pop...
Power Automate
Answered

Write text to file populating double backslashes

(0) ShareShare
ReportReport
Posted on by 391

Hi everyone, i can't figure out what is going on with PAD as it is adding extra backslashes to the file path

nicklim_0-1697517905973.png

 

 

This is my PAD flow, as you can see it has only one slash between the path

nicklim_0-1697518039528.png

 

 

 

I have the same question (0)
  • Srini007 Profile Picture
    3,490 Super User 2026 Season 1 on at

    Hi @nicklim 

     

    Have you tried checking in the text file? because when you see the preview of the output it will always show you as \\, but is the output you are writing is same you are getting as double slash?

     

    If you find this reply helpful, please consider giving it a LIKE AND

    If this reply answers your question or solves your issue, please ACCEPT AS SOLUTION

     

    Thanks,

    Srini

  • CFernandes Profile Picture
    8,504 Most Valuable Professional on at

    Hey @nicklim 

     

    I assume it's adding \\ because it's trying to escape the character in the string. You should get correct result in the file.

     

    see  article - https://www.notecasepro.com/help/help_files/notes/OCjeW9GkNnBBagVB2NZ90A.html#:~:text=Characters%20to%20be%20escaped%20include,be%20relevant%20in%20file%20paths.

     

    Reference Text -

     


    On Windows                    

    On Windows, the backslashes in a file path must always be escaped. For example:

        strFileToOpen = "C:\\Tmp\\notecase_tmp.txt"

    But on recent versions of Windows, you may optionally use the forward slash as the path directory delimiter without escaping, just as on Unix/Linux:

      strFileToOpen = "C://Tmp/notecase_tmp.txt"

     

    If this reply has answered your question or solved your issue, please mark this question as answered. Answered questions helps users in the future who may have the same issue or question quickly find a resolution via search. If you liked my response, please consider giving it a thumbs up. THANKS!

     

    P.S. take a look at my blog here and like & subscribe to my YouTube Channel thanks.

  • Agnius Bartninkas Profile Picture
    Most Valuable Professional on at

    This is just because you get your inputs as a JSON string and backslashes are special characters in JSON that need to be escaped. Escaping is done by using a backslash (that's why it's a special character). If it was a single backslash, it would break the JSON structure. Double backslashes mean it's a single escaped (literal) backslash when you actually parse the JSON.

    -------------------------------------------------------------------------
    If I have answered your question, please mark it as the preferred solution. If you like my response, please give it a Thumbs Up.

    I also provide paid consultancy and development services using Power Automate. If you're interested, DM me and we can discuss it.

  • Verified answer
    nicklim Profile Picture
    391 on at

    Hi all, thanks for your input and suggestions. The issue was the in-built powershell script wasn't passing the $email value into the input variable %email% correctly. Hence it failed to write text to file.

     

    The workaround I did was create another cloud and RPA flow, where it pass the email value directly from SharePoint to Power Automate desktop. Seems to be working fine that way.

     

    Thanks again everyone!

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 June Top 10 Community Leaders!

These are the community rock stars!

Leaderboard > Power Automate

#1
David_MA Profile Picture

David_MA 262 Super User 2026 Season 1

#2
11manish Profile Picture

11manish 167

#3
Haque Profile Picture

Haque 154

Last 30 days Overall leaderboard