Remove extenssion from names extracted using Directory.GetFiles

Dears,

Please tell me how to exlude extenssion from the follosing array :
Directory.GetFiles(“DirectoryPath”).[Select](Function(d) New FileInfo(d).Name).ToArray() , Knowing that : DirectoryPath contains “*.xlsx” files. Thx

@hsendel Check modified statement below

Directory.GetFiles(“DirectoryPath”).[Select](Function(d) System.IO.Path.GetFileNameWithoutExtension(New FileInfo(d).ToString)).ToArray()

2 Likes

This topic was automatically closed 3 days after the last reply. New replies are no longer allowed.