Skip to main content
Community site session details

Community site session details

Session Id : hrCG65I3xMUmXycsnwi9go
Power Automate - General Discussion
Unanswered

Take my Input file name and add _Output and give it as the name of the outfut file

Like (0) ShareShare
ReportReport
Posted on 30 May 2024 00:53:59 by 31

Hi,

 

I have a csv file, names xyz.csv. I have made my modifications to the csv and generated the output file (csv) saved in OneDrive. That output file should be named cyz_Output.csv. How can I do that?

 

Thanks,

  • ricpower00 Profile Picture
    42 on 31 May 2024 at 00:46:58
    Re: Take my Input file name and add _Output and give it as the name of the outfut file

    Sure lets assume your source file and output file are in different folders in OneDrive.

     

    You can get the source file name by using list file in onedrive action. Use a compose action to extract the name. The expression will be something similar to the below:
    substring(outputs('List_files_in_folder')?['body/value']?[0]['Name'], 0, indexOf(outputs('List_files_in_folder')?['body/value']?[0]['Name'], '.csv'))

     

    You can pass that in when creating your output file.

    ricpower00_0-1717116382301.png

     

  • DryMouse555 Profile Picture
    31 on 30 May 2024 at 23:36:28
    Re: Take my Input file name and add _Output and give it as the name of the outfut file

    Hi, thanks for the reply. Can you please guide me on  how to do that? Very much appreciate your help.

  • ricpower00 Profile Picture
    42 on 30 May 2024 at 06:23:32
    Re: Take my Input file name and add _Output and give it as the name of the outfut file

    Is your source file in OneDrive as well? You can extract your source file name and pass in through as dynamic contents when setting the new file name.

  • DryMouse555 Profile Picture
    31 on 30 May 2024 at 06:07:03
    Re: Take my Input file name and add _Output and give it as the name of the outfut file

    Yes, but I want to automatically get the input file name followed by output. I don't want to do this every time I run the flow. It should do it automatically. 

  • ricpower00 Profile Picture
    42 on 30 May 2024 at 01:26:03
    Re: Take my Input file name and add _Output and give it as the name of the outfut file

    Not sure if I understand your question correctly but you can name your file as you want, when you use the create a file in onedrive action.

    ricpower00_1-1717032351495.png

     

     

  • creativeopinion Profile Picture
    10,458 Super User 2025 Season 2 on 30 May 2024 at 01:05:45
    Re: Take my Input file name and add _Output and give it as the name of the outfut file

    @DryMouse555 You'll need to use an expression to do this. Check out this section of my latest YT Tutorial: 

     7 Functions You Need to Know | ️Expression Essentials: Part 1

     

    In this section, I show a flow that takes attachments received from specific emails and saves them to a specific folder on SharePoint. The flow checks to see if a file with the same name already exists, if so—it’ll append a timestamp to the filename. You can use the same concepts covered in this tutorial and apply them to your flow.

     

    In the full tutorial I cover 7 functions you need to know when getting started with expressions.

    1️⃣ empty()

    2️⃣ coalesce()

    3️⃣ equals()

    4️⃣ if()

    5️⃣ concat()

    6️⃣ length()

    7️⃣ split()

     

    I cover how to use these functions in expressions and I’ll also cover common mistakes when it comes to writing expressions and show you a few tips and tricks along the way.

     

    As a beginner or even an intermediate flow builder—expressions can seem a bit complex at first, I’m going to try to simplify it for you. If you want to level up your flows by writing expressions—keep watching!

     

    IN THIS VIDEO:

     What is an Expression?

     What is a Function?

     What Does Wrapping a Function Mean?

     How Do I Insert an Expression?

     How to Use a Compose action

     How to Navigate the Expression Builder with Arrow Keys

     How to use the Expression Tooltip

     Common Mistakes When Writing Expressions

     How to differentiate a null from an empty string

     How to Get Dynamic Content When it’s Not Listed

     How to Use a Get Item Action to Verify Dynamic Content Output

     How to Convert Strings to Lower Case

     How to Troubleshoot the if() Function

     

    Hope this helps!

    If I helped you solve your problem—please mark my post as a solution .
    Consider giving me a 👍 if you liked my response!

    👉 Level up your Power Automate skills by checking out my tutorials on YouTube
    👉 Tips and Tricks on TikTok and Instagram

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

Paul Stork – Community Spotlight

We are honored to recognize Paul Stork as our July 2025 Community…

Congratulations to the June Top 10 Community Leaders!

These are the community rock stars!

Announcing the Engage with the Community forum!

This forum is your space to connect, share, and grow!

Leaderboard > Power Automate

#1
Michael E. Gernaey Profile Picture

Michael E. Gernaey 497 Super User 2025 Season 2

#2
David_MA Profile Picture

David_MA 436 Super User 2025 Season 2

#3
Riyaz_riz11 Profile Picture

Riyaz_riz11 244 Super User 2025 Season 2

Loading started