I have a filename that will vary up to the suffix .csv.new. I need to extract the stem.  Example file1_test.csv.new.  I need to strip out the stem file1_test to create a variable file1_test.err.
Remove a substring of filename
filenames