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 / Move multiple text fil...
Power Automate
Unanswered

Move multiple text files from Onedrive business to SharePoint and change filename last 10 characters

(0) ShareShare
ReportReport
Posted on by 6

Hello, I am going to have 4 text files uploaded daily from a nightly SAP batch run.  I'm trying to move these four files to a SharePoint folder and rename them by removing the last 10 characters from each of their filenames and I can't seem to get this to work. 

Categories:
I have the same question (0)
  • Verified answer
    Nived_Nambiar Profile Picture
    18,129 Super User 2025 Season 2 on at

    Hi @BandersonME 

     

    Try this approach 

     

    Nived_Nambiar_0-1683396385751.png

     

    for name , try this expression :

    concat(take(items('Apply_to_each')?['NameNoExt'],sub(length(items('Apply_to_each')?['NameNoExt']),10)),'.',split(items('Apply_to_each')?['Name'],'.')?[1])
     
    This will ensure that file name doesn't contain last 10 characters while creating same file in sharepoint 🙂
     
    Hope this helps
    Mark it as solution if it resolves your query !
     
  • BandersonME Profile Picture
    6 on at

    @Nived_Nambiar it doesn't seem to be working.  What are you using at the top of the flow above list of files in folder?

  • Nived_Nambiar Profile Picture
    18,129 Super User 2025 Season 2 on at

    Hi @BandersonME 

    I am using manually trigger flow at top before list of files in folder 

    May i know what error you are getting ?

     

     

     

  • BandersonME Profile Picture
    6 on at

    @Nived_Nambiar I can create another request if needed, but how would I delete the original files from the Onedrive?  If I add in a Delete File box under the Apply to All, it only deletes one.  If I add Delete File "File Content" in the Apply to All, it errors out.

    BandersonME_0-1683569993891.png

     

  • Nived_Nambiar Profile Picture
    18,129 Super User 2025 Season 2 on at

    Hi @BandersonME 

     

    Since create file action was showing error, so the delete file hasn't worked. 

     

     

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 523 Super User 2025 Season 2

#2
Tomac Profile Picture

Tomac 406 Moderator

#3
abm abm Profile Picture

abm abm 245 Most Valuable Professional

Last 30 days Overall leaderboard