Classifying the output files(more than 1000) files based on Place mentioned in filename

Hi All,
Can anyone please tell,
i am having more than 1000 files in output folder, i want to create the folder based on placename in the FILENAME, it may have more than 10 pdf files for same place, i want to add all the files which belongs to that place to one folder.

What is the filename format?

Hi @Lak_Ui, Rownumber_Placename_weeknumber.
under one place, there may be more than 1000 pdfs. all should save in that folder.

Hello @M1288

Do you have some predefined list of place names available with you???

If yes you can do as below.

Use create folder activity to create the folder
Use assign activity and add the expression. Directory.GetFiles(“”common folder path”,”placename”)

All the placenames are contained in an excel file?

Then you can loop through each placename
Directory.Getfiles( “folderpath”,“placename”)

For each file in the directory

Use move file activity with input path as file and output path as “Folder path/placename/directory.getfilename(file)”