How to trim moves file

Hello,

IN Above shows image first text file I don’t want that number which shows ahet of the text file

I’m downloading the text file and moving that file in some folder but the file name is same so whenever I’m running the bot it’s giving that number end of the file name so what to do for that

Thanks.

Hi @suraj_gaikwad

You can rename the file by Rename file activity. It will rename the file.
image

Hope it helps!!

@mkankatala
Actually i don’t want to rename file file name.will be same just that number which is showing ahed of the name that i don’t want

It’s not possible to do like that. If any same file is there in that folder, the same file is moving to that folder at last of file name the number is automatically then to separate the files. In this case we have only choice to rename the file by using rename file activity @suraj_gaikwad

Hope you understand!!

@suraj_gaikwad

If your filename contains no spaces other than the space between the number and the name then use this

Use a rename activity with

Input as filepath

Newname as Path.GetFileNameWithOutExtension(filepath).Split({" "},Stringsplitoptions.None)(0) + Path.GetExtension(filepath)

Ideally where ever you are downloading the file may be some files with same name already exists and that is the reason the numbers are getting appended …if you clear the file always before saving then numbers would not appear as well

Cheers

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