How to check Filename against csv File to move/rename the file

I have a csv file. Read CSV activity can’t seem to work for me as error message tells me that the file format is invalid. So, I use Excel Application Scope and then use Read Range activity under Excel.

After read range, I use For Each Row activity and assign ArrFilePath = Directory.GetFiles(“C:\Users\aly\Downloads”,“RefNo *.zip”) to only get the specific zip file from the Downloads folder.

SpecificZip File

Then outside of For Each Row, I have the For Each activity for the specific files in Download Folder to Move File the zip file to Desktop Folder.


So how to make it that the robot is able to check the file name in Download Folder and if it’s the same as the Ref No in the first column of the CSV file, the zip file will then be able to rename it to the Name column in the CSV file?


you can use
Directory .getFilesNamewithoutExtension(ArrFilepath) with in For Each then Check
File Name one by one with if Avctivity and rest you know

1 Like

Hi. I can’t seen to put Directory.GetFilesNamewithoutExtension(ArrFilePath) because its not a member of

Is it you meant by Path.GetFileNameWithoutExtension(ArrFilePath)? But i have error Value of type ‘1-dimensional array of string’ cannot be converted to String.

My For Each activity TypeArgument is String.