Move and Rename File

Team,
image

I am Moving and File and then trying to rename it (refer attached snapshot)
Move File is successful but Rename File is not working.

Any suggestions ?

@prerna.gupta

It would be best if you gave the filename and then an extension in the file field of rename file activity. Please show us what is inside the path variable and folder name variable

Hi,

In this case, RenameFile is not necessary, I think. Can you try as the following?

 System.IO.Path.Combine(str_Downloads_FolderPath,str_foldername,"abc"+System.IO.Path.GetExtension(item))

Regards,

This is not working as expected here :
System.IO.Path.Combine(str_Downloads_FolderPath,str_foldername,“"+“TaskId”+”“+str_todaydate+”“+str_Count.ToString+”“+str_Credit.ToString+”"+str_Debit.ToString+System.IO.Path.GetExtension(item))

where abc = “"+“TaskId”+”“+str_todaydate+”“+str_Count.ToString+”“+str_Credit.ToString+”"+str_Debit.ToString

Hi,

Can you share output of the above expression using WriteLine or MessageBox activity?
And also expected output?

Regards,

image

Syntax error not able to run this piece of code, though all variables are having values as expected

image
PFA Error snapshot

Hi,

Can you attach it at even magnification? We cannot read it due to small.

Or paste it using preformatted text ( the above </> button)

Regards,

There is only option to upload or paste image

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