I have a function to read the files from the folder, and it is not working. I need a functional function that reads files from folders and subfolders. Here is the code:
FolderBrowserDialog fbd = new FolderBrowserDialog();
DialogResult result = fbd.ShowDialog();
txtArquivo.Text = fbd.SelectedPath.ToString();
//Marca o diretório a ser listado
DirectoryInfo diretorio = new DirectoryInfo(txtArquivo.Text);
//Executa função GetFile(Lista os arquivos desejados de acordo com o parametro)
FileInfo[] Arquivos = diretorio.GetFiles("*.xml; *xlsx;");
string[] files = System.IO.Directory.GetFiles(fbd.SelectedPath);