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

Community site session details

Session Id : 3RASkeVMT4CEraetE+tz8Q
Power Automate - Using Flows
Answered

Renombrar archivo

Like (0) ShareShare
ReportReport
Posted on 7 Mar 2022 19:55:42 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

I have the same question (0)
  • ScottShearer Profile Picture
    25,240 Most Valuable Professional on 07 Mar 2022 at 20:56:11
    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.

     

     

  • Verified answer
    Servicios2015 Profile Picture
    17 on 07 Mar 2022 at 22:27:29
    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

     

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

Responsible AI policies

As AI tools become more common, we’re introducing a Responsible AI Use…

Chiara Carbone – Community Spotlight

We are honored to recognize Chiara Carbone as our Community Spotlight for November…

Leaderboard > Power Automate

#1
Michael E. Gernaey Profile Picture

Michael E. Gernaey 666 Super User 2025 Season 2

#2
Tomac Profile Picture

Tomac 382 Moderator

#3
developerAJ Profile Picture

developerAJ 254

Last 30 days Overall leaderboard

Featured topics

Restore a deleted flow
Loading complete