[SOS To Uipath Angels] How to rename files and copy them to new folder

Hi Uipath angels,

:sob::sob: Our teams are currently facing with following technical problem.
Deadline will be expired unless we can solve it within 3 days.
Pleeeeease kindly help Uipath Angels:sob:

■Issue Description
In following screenshot, we are expected to change file name and move those files to differnet folder.
Specifically,change the file name where “a” and “b” is with the string “3837_000_000_name”,
after renaming, move those 3 files to a new folder.

You contribution will be HIGGGGGGGGHLY appreciated if we could get some details or .xaml sample

Thanks in advance,

@yangbo Can we add below string as hardcoded or should be copied from first file?

1 Like

Can we use replace command to rename it.but need something constant in input to do so.pls correct if wrong.

1 Like

Hi @yangbo,

There are multiple ways to manipulate the string name. Not sure if you got more files, but to give you an idea Here’s the sample attachment for your scenario:

FileMoveRename.xaml (11.1 KB)

Hope this helps you!

Regards,
PD

2 Likes

Hi Manjuts90,

Thanks soooo much for your reply and apologize for the sample provided above since it is not good.
“3837_000_000_name” cannot be hard code since data provided is not entire data.

The oringinal data is like following.
※※※In a word you can regard the first file name as title in each set, get the string between “~_00” and “.txt” and insert it into the place where “a,b,c,d,e,f,g” are.

20181202_HL00431_00_3837_000_000_name.txt
20181202_HL00431_01_a.txt
20181202_HL00431_02_b.txt

20181202_HL00441_00_3803_001_020_name1.txt
20181202_HL00441_01_c.txt
20181202_HL00441_02_d.txt

20181202_HL00555_00_3803_001_020_name1.txt
20181202_HL00555_01_e.txt
20181202_HL00555_02_f.txt
20181202_HL00555_03_g.txt

etc.

Many thanks,

Thanks for the reply.
As you said guess we need use replace, could you kindly check my reply to Manjuts 90 and give me a sample?

You cannot imagine how helllllllllpful your sample is!!!

I checked it your sample carefully and it looks you are using string “a” to create a new path.
As my reply to Manjuts90, acutlly there are more than 100 data sets in the same original folder and “a” sometimes changing.
Can I still get a sample how to make it even there are multiple datasets?

Anyway, reallly appreciated for the help again.

@yangbo In folder u will have one file like below right.

Rest of the file will be like below.

@yangbo check below file once and let me know

FIlesMove.zip (3.2 KB)

2 Likes

This topic was automatically closed 3 days after the last reply. New replies are no longer allowed.