How to add prefix to filename in assign activity

I want to add prefix to a filename in assign activity

Hi @ishwari_mahajan

simply do like this “prefix”+filename

image

Cheers,
Timo

Hi @ishwari_mahajan,

you can grab the filename of your path with something like that: path.GetFileNameWithoutExtension(path)

than add the prefix like @Omit

Hi Omit , I tried your suggestion but it is giving me error while moving the file as below:

image

newPath = Path.Combine(Path.GetDirectoryName(filename), prefix & Path.GetFileName(filename))

Sorry but I am not getting you, like where exactly I am supposed to implement that code.
here is snapshot of my current code:

When you assign New_Filename:

New_Filename = Path.Combine(Path.GetDirectoryName(filename), "OLD" & Path.GetFileName(filename))

I hardcoded prefix as “OLD”.