Skip to main content

Notifications

Community site session details

Community site session details

Session Id :
Power Automate - Using Flows
Answered

Renombrar archivo

(0) ShareShare
ReportReport
Posted on by 17

Buenos días.

 

Espero me puedan ayudar.

 

Quiero renombrar archivos y guardarlos en one drive.

 

Actualmente este proceso ya lo solución con la variable Split  

split(items('Cambia_nombre_calca_2')['nombre'], '.')

 el cual me separa el nombre de la extensión, es decir

documento. jpg me traerá jpg el cual después agregare

Servicios2015_1-1646682865036.png

 

El  problema radica que algunos usuarios  subirán archivos con nombres que tienen mas de .

 

Por ejemplo documento.2de.jimenes.dos.jpg

Me dejara la extensión 2de

 

Como podría hace para que me traiga lo que esta en el último punto o que lea la cadena de derecha a izquierda y me traiga lo que esta primero.

 

Espero me puedan ayudar.

 

Agradeciendo su ayuda

  • Verified answer
    Servicios2015 Profile Picture
    17 on at
    Re: Renombrar archivo

    Buenos dias.

     

    Me sirvió de mucho ya que me hizo comprender otra solución.

     

    Use la función last(item())

     

     

    Servicios2015_0-1646691934333.png

     

     

    Gracias

     

  • ScottShearer Profile Picture
    25,208 Most Valuable Professional on at
    Re: Renombrar archivo

    @Servicios2015 

    You can use the length() expression to see how many elements are in the array output by your split() expression.

    If there are only 2 elements, then proceed as you do now.

    If there are more than 2 elements, then you can use concat() to put all the elements back together and put a period in the middle except for the last element.  Remember that the first element has an index of 0 and the last element will have an index of the output of the length() expression minus 1.

    Let me know if you need more help.

     

     

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

🌸 Community Spring Festival 2025 Challenge 🌸

WIN Power Platform Community Conference 2025 tickets!

Markus Franz – Community Spotlight

We are honored to recognize Markus Franz as our April 2025 Community…

Kudos to the March Top 10 Community Stars!

Thanks for all your good work in the Community!

Leaderboard

#1
WarrenBelz Profile Picture

WarrenBelz 146,631 Most Valuable Professional

#2
RandyHayes Profile Picture

RandyHayes 76,287 Super User 2024 Season 1

#3
Pstork1 Profile Picture

Pstork1 65,991 Most Valuable Professional

Leaderboard

Featured topics

Restore a deleted flow