Refresh the folder

i have 10 files in a folder i have moved some files to the other(6 files),so after using the same variable of folder which previously contains 10 files must be in the form containing remaining
4 files.how can i refresh the folder to show only the remaining 4 files.any one help on this?

1 Like

Hi Priya

Hope you are doing good

I hope we dont need to refresh as it got moved to another folder already
once after moving now if we are trying to access that folder and get all the file path as a array it will give only for those four files

Cheers @priyankavivek

1 Like

i have taken as an array while processing it shows the error that files not found, and its shows same file containing ten files
variable 1 :array [1 2 3 4 5… 10]
move file
error while using the variable v1 after move file

output array [ 6 7 8 …10]

1 Like

Yah that array would have stored the values from that folder when the files where there
After moving we need to again get the array value by using assign activity with Directory.Getfiles method
Because it has now only four files and we need to get that values in the array may be a new array variable

You were almost done
Cheers @priyankavivek

yes i have done this far , but i need to reduce the looping is there any option other than directory.get files.

Fine
Using Directory.GetFiles method won’t impact the performance as we are just getting the filepath as a array even though we iterate with those values In a for each loop
Yes of course we have methods
Like invoke method with Directory.move method where we can pass the file path as input argument may be with two or three in arguments
But that is not feasible unless we know how many files are there in exact as we need to mention them with array index

So using for each loop is fine

Kindly correct me if I m wrong
Hope this would help you
Cheers @priyankavivek

1 Like

thank you for your reply.:slightly_smiling_face:

1 Like

Kindly let know for any queries or clarification
Cheers @priyankavivek