How to save file with same name excluding extention

Hi,

I am in a automation where is am changing the file extension but i want to save with same name without extention. what should i write in "save as file " ? so it will replace old one

@Hemant_Deshmukh,

Put this in your Save as file

Path.Combine(Path.GetDirectoryName(yourOriginalFilePath),Path.GetFileNameWithoutExtension(yourOriginalFilePath)

Thanks,
Ashok :slight_smile:

Hi @Hemant_Deshmukh

You can try this way,

Copy the file into another location

image

here “D:\Testing_Purpose\DT1.xlsx” → Change your filepath

"D:\Testing_Purpose\New folder (2)" → Mention your folder path

Then use the rename the file activity

image

here “D:\Testing_Purpose\New folder (2)\DT1.xlsx” → Mention the copy file location

Path.GetFileNameWithoutExtension(“D:\Testing_Purpose\New folder (2)\DT1.xlsx”) → Change the file path of yours

So it will save the file without extension same name

Regards,
Gowtham K

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