i have multiple folder with crn numbers each of the crn numbers contains some files
what i want is to get all the duplicates crn folder
for eg folder name “3211_datetime” now there are 5 folders that contain the string “3211” in there name , i want to get all the files from all the duplicate crn and store it in one crn number for eg , 3211_10:2:00,3211_12:11:11,3211_13:13:11
take the underscore as a separator for the crn number and the date or time
now after getting each files from the duplicates crn folder create a new folder with the same crn number for eg “3211” and store all the files in that ne folder
its static with the crn number but how will i make dynamic and where is it checking for duplicates?, and one more thin in my enviorment im nable to get the for each folder in folder and file in folder activity i can only use foreach
you can use variable in place of 3211…you can have whole of this inside a loop for each crn you have…
your for each folder in folder will get each folder starting with 3211 or the crn …so if there are duplicates it would loop through those folders as well
If you dont have those activities then use directory.GetDirectories("Folderpath","3211*") and directory.Getfiles(currentfolder)
Both of the above expressions will give you array of strings/paths…use for each activity adn change typ argument to string and use these expressions in the in argument