Im trying to get file name without its extension, i have the following code that let me take the file name with extension which is
var docName = new DirectoryInfo("C:\\files\\").GetFiles("*.docx");
with that code im taking all of the file names then use them on
for(int a = 0; a < docLength; a++)
{
Consol.WriteLine("Your File Name : {0}", docName[a] ) // this part is just ex.
}
when i execute the program it will list the file names like
Test.txt
test.docx
and etc.
how can i get the document names without their extensions like
test