Can anyone help me with this? (Organize my files by type)


I am a new UiPath developer, I just got a task where I have different files stored in a folder and I need to sort them by file type. I have solved this, but there was also a request that if the sorted folder already has a file with the same name, the user should be notified before overwriting. Can you help me how to implement this? (The user can choose to overwrite.)

Thank you,

1 Like

Hi @Sandor_Salamon

You can use the path exists to check whether the same file is existing inside the sorted folder or not.

The o/p of this activity is a boolean variable, if it is False, it means file does not exists, if it is true, file exists, as per ur requirement, if file exists, you had to notify the user , which u can do via input dialog holding it till user performs some actions, i meant a attended automation
Thanks & Regards,
Nived N

1 Like

Thank you very much for your help.

Could you please send me an example of a similar solution.

If the file cannot be overwritten, should the process continue, what do you suggest?


If the user did not give approval for overwritting the file

Then we can make the bot to move the file to another folder

Hello @Sandor_Salamon

Are you sorting the files in a folder and checking whether duplicate filenames are there? Are you considering any different extension and only filename matters here?

Hi @Rahul_Unnikirshnan!

For now, it just checks if the filename is already in the folder. If so, the robot will ask if you really want to overwrite it before doing so.