I try to check if a foldername doesnt has a extensie. Because I want to change the name of the folder. But you can also change the name of a file. But I get this error:
"startIndex cannot be larger than length of string.\r\nParameter name: startIndex"}
By this line:
string newFilenameExtension = Path.GetExtension(model.FileName.Trim()).Substring(1);
So how to check if the foldername has no extension?