Help Me Retrieve the Index Letters from a file name

At my end everything works perfectly fine…

“File” is data type “System.io.fileinfo”
It has propperty “Name” that holds the name of the file.

image

Using the “Substring” method is the retrieved the file name without extension.

Personally, I would rather use following method to get the file name wihtout extension.
FileName = path.GetFileNameWithoutExtension(File.Name)

Cheers

1 Like