I have a scenario in which I need to Look for the multiple Folder .Inside a main folder based on ID available with me.
As you can see in the below Screenshot .Listed are multiple folder and I have Values like {“345708”,“340138”,“338115”,“353220”} using these values I need to find Folder and Zip that Folder and move it to other location.
Can any one suggest me the steps to perform this .
You can use For Each Folder in A Folder For iterating through the folders.
Inside that use if condition to check the Folder name contains your string if it matches then you Zip That file using Compress/Zip Files
Get Folder Names:
Assign activity: folderNames = Directory.GetDirectories(“Path\to\main\folder”)
Filter Folders Based on IDs:
For Each activity (TypeArgument: String, Values: folderNames)
If YourListOfIDs.Contains(Path.GetFileName(folderName))
Then
// Process the folder
Else
//
Hi @shashank_dullu ,
you can use ‘GetDirectories’ to get all the subfolders inside it as an array.
then foreach folder in array folder
can find folder name ‘contains’ then zip it
regards,