Move file with variable name

uiautomation

#1

I’m trying to do a Move file activity getting the in a for each loop, but I’m getting an error message.

I’m using the following as a path: “C:\Users\xxx\Desktop\test” + files.FullName

What shall I use instead to make this work?


#2

Did you try converting the full path as variable and use the variable in Path property?


#3

I tried to use a variable following your advice, but I get the same error. I can see the right path if I use a message box.

I have the variable set as String. Is this correct?


#4

What is the error message?


#5

The error is : The given path format is not supported


#6

try this for fullpath


#7

Thanks vvidya.

It worked with: path.Combine(Folder_Path, files.FullName)


#8

@vvaidya

When I use the move file , I am getting the following error:

Move file : The process cannot access the file because it is being used by another process.


#9

Probably the file is open somewhere or used by other process and not disposed.


#10

I found once that the process was trying to read team files being written in a watch folder and produced this type of error. I’ve resolved this by adding a delay before starting to read the files.

Hope this helps