Read files from mutiple folder excpet subroots folder

Hi Friends,

on particular path i have one folder(ABC) and (DEF) contaning two subfolder.
i want to read files from ABC and DEF Folder only
then how i can take the files.
please help me over this.

Hi @Rup_1

I am confused with your question,

You have a folder path as C:/XYZ

And it has multiple folder, but you need to read only:

C:/XYZ/ABC and
C:/XYZ/DEF

Is this correct ?

@Rup_1

Use Directory.GetFiles(Path which you want to get the files)

and the type of the variable should be String array

Hope this helps

Thanks

Hi,
Sorry for late response
Yes u r right

Put the path

Use Directory.GetFiles(Path which you want to get the files in string)

This is how you can get the values in Array!!!