How to modified the file's name

Dear all,
there are some .pdf files in a folder, the name format as follows :
20191025_05780002_xxxxxx.pdf
how could i change the file’s name to
70560000_578002_20191025_xxxxxx.pdf
especically for the 05780002 to 578002
anybody who could give me hand? thanks a lot in advance.

@Chris-Yiwei

use the Move File activity used to rename the File

Regards,
A Manohar

i know use the move activity
but how i get the file‘s name
for example 05780002 to 578002 ?

When you moving the file, in the destination just change the name to “578002”

@Chris-Yiwei

In Destination Try to give the Desired File name you want.

Regards,
A Manohar

the 05780002 to 578002 is just an example 。
there are many pdf files in this folder
I mean i just want 0xxx0002 to xxx002 like this

the 05780002 to 578002 is just an example 。
there are many pdf files in this folder
I mean i just want 0xxx0002 to xxx002 like this

@Chris-Yiwei

1.Use Get Files activity and Read the Files From a Folder and store it in a Array List.
2.use For each,you will get the name of the individual Files.
3.use move File activity and in Destination give the static File name.

Regards,
A Manohar

could you give a demo code?
thanks a lot in advance

Use trim to remove 0

@Chris-Yiwei

Download the package UiPath.DirectorySearch.Activity
You will find Get Files Activity
In Filter Give Extension as “*.PDF”
In Search Directory Give the Path of Folder.
In FilePaths give output list variable.

how to use the trim to remove 0 ? it is the key role、

Fine hope these steps would help your resolve this
—if the filepath is in a string variable named
Str_input = “ 20191025_05780002_xxxxxx.pdf”

So now use a assign activity like this
Str_output = Str_input.Replace(“0”,””).ToString

Now use a Move File activity and mention like this
In path property as str_input and destination property as Str_output in the property panel

Cheers @Chris-Yiwei

i just want to replace the 05780002 the first 0 and the 5th 0 , how could i achieve the function?