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

Notifications

Announcements

Community site session details

Community site session details

Session Id :
Power Platform Community / Forums / Power Automate / Removing Empty New Lin...
Power Automate
Unanswered

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?

I have the same question (0)
  • 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

Forum hierarchy changes are complete!

In our never-ending quest to improve we are simplifying the forum hierarchy…

Ajay Kumar Gannamaneni – Community Spotlight

We are honored to recognize Ajay Kumar Gannamaneni as our Community Spotlight for December…

Leaderboard > Power Automate

#1
Michael E. Gernaey Profile Picture

Michael E. Gernaey 538 Super User 2025 Season 2

#2
Tomac Profile Picture

Tomac 405 Moderator

#3
abm abm Profile Picture

abm abm 252 Most Valuable Professional

Last 30 days Overall leaderboard