Change the name of a file after downloading

In my automation after downloading a file I need to change its name but it changes its name when downloading every day but a part of the name is fixed and the part that changes is the date that is in front of the file name. I want to change the file name after downloading the file
(Note: it has to be done in the background)

Hi @william_emanoel

In your case, You can set the destination path of the downloaded file in an empty temporary fold, and then use the copy file activity to copy it to the desired location whenever the download is complete (when the file has correct extension), and then empty the temporary directory.
Since there is always only one file in the temporary directory, you don’t need to worry about copying wrong files or duplicate files.
You can specify the file name you want in the argument To of Copy File activity.
For example: Now.ToLongDateString + “_” + fileNameString

hi @william_emanoel

Assuming you are using the activity wait for download for downloading the file,
you can get the filename in the variable,

Just use Move file activity, it could be used to rename the file as well.

Use the Wait for Download activity. It’ll give you back an object containing the file info, which you can then use to know the filename of what was downloaded.

@william_emanoel

Download the file to a default folder or empty folder
Use Move file activity to move from that default folder to another folder and you rename the file in destination

YourFolderPath+Now.ToString(“yyyy/MM/dd”)+“FixedPart”+“YourExtension”