For each file in folder, rename the all files with(old name+ values from table column)

Hello,

Rename the files .

Old name = Payment(1).xlsx.

New name= Payment(1)-ES.xlsx
Data table values can be.
ES,BE,DE,SE,IT

Hi

How many files will be there and do u want all the files to be replaced with name from datatable

And will datatable will only one column and same number of rows equivalent to file count

@POOJA_MARUTI_BALIGIDE

Hi @POOJA_MARUTI_BALIGIDE ,
Can you share condition to get value data with file name?
or each file and each data row value
we can use for each file inside for each data row,
use activity rename
with newname = olname+ row(data column name).tostring

regards,

HI @POOJA_MARUTI_BALIGIDE

you can try this way

output :

1 Like

@Palaniyappan ,

The bot will go to each respective vendor portal and download the report if data report available.
When it downloads the report, the files can vary from Payment(1).xlsx,Payment(2).xlsx,Payment(3).xlsx,Payment(4).xlsx…
These files has to be renamed with Payment(1)+“-”+Country Code.xlsx
Country Code values are in DT.
Data.xlsx (9.2 KB)

@POOJA_MARUTI_BALIGIDE Follow these steps.

==> Inside for each file in folder-

a) Get current file name.
b) LookUp DataTable to get value from DataTable (To be added in file name)
c) Concatenate current file name and Output from LookUp DataTable.
d) New file name= concatenate value (from step c)

Regards,
Dev

@Praveen_Mudhiraj ,

Thank you for the reply.

I want to rename all the files in folder

@Nguyen_Van_Luong1 ,

I have tried this solution, but the file is getting renamed with all the data table values.

EX:
image

Hi @POOJA_MARUTI_BALIGIDE ,
with each loop get only 1 row value, you can add break after rename activity
regards,

@devasyasingh ,

Can you provide xaml file

In the excel country code as 26 rows so we need to create the 26 files ?

@POOJA_MARUTI_BALIGIDE

@Praveen_Mudhiraj ,

The Bot will go respective vendor portal and it downloads the report only if data is available in that portal.
For each downloaded report , It has add country code at the end.
Excel files can 20, 23 0r 26 count depend on if data available in the portal

@Palaniyappan ,
Any update on this?

hi @POOJA_MARUTI_BALIGIDE ,
my output
image
my input
file data
image
folder
image
my code
Rename.zip (95.9 KB)
regards,

@Nguyen_Van_Luong1 ,

Thank you so much, Its working as expected.

Cheer @POOJA_MARUTI_BALIGIDE ,
Happy automation !

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