Move a file or Rename a file



I am trying to insert the following senetence

But I don’t know which activity I must use because I tried to use “Assign” but It is shown a windows “Expresion does not produce a value”

Which activity Can I use to Move a file?

Is there a way to Rename a file?

I don’t see in the options the method “Rename” for a file

How to move a directory and its files to a new path
Rename excel or any other file

Hi Lucky
Please follow below steps
Activity Name :Invoke Method
Target Type : Microsoft.visualbasic.filesysytem

MehtodName :Rename

Go to Properties of Invoke method
Direction—Type-- -Value
-----In------- string – “OldFilename.txt”
-----In------- string – “NewFilename.txt”


Email Automation - Help Please

There’s a MoveFile activity that does just that, no need for InvokeMethod.

For Renaming you “move” the file to the same folder, just with a different name.

As a sidenote - I’d recommend using System.IO.File type, method name Move instead of Ms.VB, since it doesn’t rely on VB specific implementation.




In fact, I did that, I hat to move the file to the same folder but renaming it

Saving attachements from outlook, with new name

hey @Lucky0906

as @andrzej.kniola said

For Renaming you “move” the file to the same folder, just with a different name.

it will do what you wants.

To move a file from one destination to other destination with a different name then just rename the file when filling in the destination path

MoveFileWithRenameUsiNgMoveActivity.xaml (4.3 KB)


Rename web downloaded excel file and save in particular path

The file name that I need to rename is not static. It changes daily.

How do I specify a wild card in the file name using the “Path” field in the “Move File” activity?

Can anyone kind-hearted help checking following post? -- Regarding changing file name and move file


In a similar case I found it easier to create a MSDOS batch file to move files using wild cards. You need to use StartProcess activity to call the batch file with the MSDOS commands.

Hope it helps


@BoCoNdOn What is the naming convention of your file?

you can always get the files by wildcard character using below logic

Directory.GetFiles("C:\Users\xyz\Desktop\files","DailyFile_*.txt") //DailyFile_040716.txt


If you move a file or Rename a file you can use my software BatchRenameFiles Tool . It’s very easy to use .


Good Job


its giving error that filesystem dose not contain rename method.


MoveFile Activity will help you in this .

Use the properties as below

From :- Path\Filename
Destination :- Path\RenamedFilename


Hi Uipath angels,

Can I get a .xaml sample about how to handle case below?
The requirement is to find target file, change file name with not static string and move all of them to another folder.

The oringinal data is like following.
※※※In a word you can regard the first file name as title in each set, get the string between “~_00” and “.txt” and insert it into the place where “a,b,c,d,e,f,g” are.