Rename filename


image

Hi Team

i have one file in D:\workbook, named dynamically due to date. how can i locate it and rename it?

Thank you

@wason_ha i assume that date is date structured format so it save that file with file name and add current date .if yes
“YOURfileName”+now.ToString(“yyyy-MM-dd”)+“.xlsx”
image
this will help you to locate you file
cheers Happy Automation

@wason_ha here its working
before file name
image
pass this in input parameter

(upload://bZVuVuhKoKBS94ENeOyZPy3BZx5.png)

image

and finally output (update name)

image

cheers Happy Automation

1 Like

Hi @wason_ha

"D:\workbook\Report" + DateTime.Now.ToString("yyyy-MM-dd")+".xlsx"

The image shows a file renaming utility where a file at "D:orkbookeport" is renamed to include the current date in the format "yyyy-MM-dd" with the ".xlsx" extension retained. (Captioned by AI)

Hope it helps!!

1 Like
  • For Each File in Folder
    – Move File

You can rename with the Move File activity, you don’t have to rename then move.

1 Like

Thank you for all the details. it works.

1 Like

it works. Thank you Pravallika.


Hi Pravallika, one more question please. how to locate these 2 types.

Thank you

image
Hi Singh, one more question please, how to locate these 2 types?

Thank you

Just use the Move File activity and in the destination property give it the full path and new filename.

Hi Paul,

when file name is dynamic due to number or date suffixes. how can i use the file path?

Thank you

Hie @wason_ha i’m assuming this is your table name -like this
“Vizlib Pivot Table - +now.tostring(“yyyy_M_d”)+“5T”+Now.tostring(“HH-mm-ss”)+” - BASED BMS").
Try this
and your previous query is resolve and this is your new query so please make a new query and post it so it help other too. if they stuck and search for this kind of query . because you open new query inside the solved query
cheers Happy Automation.

With For Each File in Folder

1 Like

Got it. Thank you for the analysis and solution!

1 Like

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