I have to check whether in share drive all 5 folders exists or not
can it be done in single activity?
hello @shilpashree.mohanty
first Create Variable
folderPaths(Array of String ) store all your folder path then
Take assign activity and ut this LINQ
allFoldersExist = folderPaths.All(Function(folder) System.IO.Directory.Exists(folder))
Regards
Dheerandra Vishwakarma
suppose, i do this
and found that 2 folders dont exists
how can i create those 2?
yes first use this will identify missing folder
missingFolders = folderPaths.Where(Function(folder) Not System.IO.Directory.Exists(folder)).ToList()
then for folder creation use below linq inside invoke code
missingFolders.ForEach(Sub(folder) System.IO.Directory.CreateDirectory(folder))
Regards
we are not allowed to use invoke code
what would be the data type for **missingFolders **
And could you please suggest linq query to create folders
missingFolders has dataype List of string.
and you can use for each inside
Inside For Each
use a Create Directory
Activity:
- Set Path to
item
(current folder path in the loop).
Regards
hey,
dint get you
- Set Path to
item
(current folder path in the loop).
this is my query
hey,
dint get you
- Set Path to
item
(current folder path in the loop).
this is my query
inside for each just implement the code to create folder
Regards
what would be current folder path?
it will be item which iterating for loop
This topic was automatically closed 3 days after the last reply. New replies are no longer allowed.