1

In MUMPS how can I get the file extension is there a class I can use? Class(%File).GetFilename that will return the Full Message name but i would just like the extension?

Set tNameIn=##class(%File).GetFilename(pRequest.OriginalFilename)

Jefferson
  • 173
  • 2
  • 12
  • 32

1 Answers1

1

You can use $piece for this.

write $piece(tNameIn, ".", *)

Should return the latest piece delimited my symbol dot
And filename without extension will be

write $piece(tNameIn, ".", 1, *-1)
DAiMor
  • 3,185
  • 16
  • 24