I wanted to store the name of the file that was received at the Receive port in BizTalk.
So, I went ahead and used the following in the expression shape to get the filename from the message property:
strFileName= MyMessage((FILE.ReceivedFileName)
But the property above returns the filename with complete file path.
And thats where System.IO namespace comes into the picture.
The handy GetFileName method below does the parsing for you, and returns the filename sweet!
strFileName = System.IO.Path.GetFileName(MyMessage(FILE.ReceivedFileName))
Happy BizTalking!
No comments:
Post a Comment