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 / Removing Empty New Lin...
Power Automate
Answered

Removing Empty New Lines in txt file in Power Automate Desktop

(0) ShareShare
ReportReport
Posted on by 6

Hello,

 

I have a txt file which looks like this:

NAME

 

 

ADDRESS

 

 

PHONE

 

I want it to be written as the one below, removing the empty new lines

NAME

ADDRESS

PHONE

 

I found an old tutorial from the forum here but I do not understand it since I am using the desktop version. Can anyone show me how to do it?

  • Verified answer
    MichaelAnnis Profile Picture
    5,727 Moderator on at

    If it’s not too big, you could loop on it. 

    Split Text by new line ‘this will make it a list

    for each item in list

       If item is empty

           ‘Do nothing

        Else

            Add to list

        End if

    end for each

    now you should have a new list with just the 3 lines

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

Leaderboard > Power Automate

#1
Mohsin Ali Profile Picture

Mohsin Ali 414

#2
11manish Profile Picture

11manish 331 Super User 2026 Season 2

#3
M Bilal Khan Profile Picture

M Bilal Khan 274

Last 30 days Overall leaderboard