Search
 
SCRIPT & CODE EXAMPLE
 
CODE EXAMPLE FOR CSHARP

c# fileinfo filename without extension

DirectoryInfo dir = new DirectoryInfo(path);
FileInfo[] files = dir.GetFiles("*.txt");

foreach (FileInfo file in files)
{
    string noExtension = Path.GetFileNameWithoutExtension(file.Name);
}
 
PREVIOUS NEXT
Tagged: #fileinfo #filename #extension
ADD COMMENT
Topic
Name
4+1 =