anon126
(mat)
1
Hello,
I would like to loop through all the files in a directory, get their names and stock them in a list variable.
What I tried:
-
Create string variable containing directory path
-
Place a for each activity where we loop through Directory.GetFiles(directory_path)
-
How can I store the string values in a list ?
Thank you !
ppr
(Peter Preuss)
2
Directory.GetFiles(directory_path).toList
Or a you interested on the filename only without folder info
2 Likes
anon126
(mat)
3
hi thnx for the fast reply. Do I use an assign activity to this ?
assign value should be of data type list ?
ppr
(Peter Preuss)
5
assign activity
LHS: myFileNames | List (Of String)
RHS: Directory.GetFiles(directory_path).toList