Get File Name of all Files inside Folder (Directory) using C# and VB.Net in ASP.Net

Last Reply 6 months ago By pandeyism

Posted 6 months ago

Hi friends,

How to Get all File names from folder in c# without path ?

example: 

i got only this C:/FOLDER1/img.png

but i need only img.png 

how to get without using any split in c#?

for(int i=0;i<_dataTable.Rows.Count;i++)
{
    string[] filenames = Directory.GetFiles(@"C:\2019\5\");
}

 

This question does not have replies that have been liked.