3
I have several. Sql files in this directory: C:\Users\anacarvalho\Desktop\Teste
how do I get all these files?
3
I have several. Sql files in this directory: C:\Users\anacarvalho\Desktop\Teste
how do I get all these files?
3
Use the Method Directory.Getfiles with the option to search in all directories
var Arquivos= Directory.GetFiles(@"C:\Users\anacarvalho ", "*.sql", SearchOption.AllDirectories);
0
For those who want to know how I solved the problem is as follows :
string path = "C:\Users\anacarvalho\Desktop\Teste";
string[] sqlFilesLocation = Directory.GetFiles(path, "*.sql", SearchOption.AllDirectories);
Browser other questions tagged c#
You are not signed in. Login or sign up in order to post.
You intend to list all scripts within the path?
– Leo Longhi
yes is to list, but at the same time run in c#.
– Ana Carvalho
I created a database, where I put the complete file paths I want. and then in c# I ran and he went to get all those files.But now I want instead of putting all the way in, just type the folder and he goes to get all the files inside that folder
– Ana Carvalho
I’m still testing! I’ll tell you something
– Ana Carvalho