Friday, March 19, 2004 5:32 PM Jan Tielens

BizTalk 2004 File Send Handler Macros Bis

Owen Allen (MS E-Business Technologies) has updated my list of File Send Handler Macros, thanks Owen!

Macro name

Substitute value

%datetime%

Coordinated Universal Time (UTC) date time in the format YYYY-MM-DDThhmmss (for example, 1997-07-12T103508).

%datetime_bts2000%

UTC date time in the format YYYYMMDDhhmmsss, where sss means seconds and milliseconds (for example, 199707121035234 means 1997/07/12, 10:35:23 and 400 milliseconds).

%datetime.tz%

Local date time plus time zone from GMT in the format YYYY-MM-DDThhmmssTZD, (for example, 1997-07-12T103508+800).

%DestinationParty%

Name of the destination party. The value comes from message the context property BTS.DestinationParty.

%DestinationPartyID%

Identifier of the destination party (GUID). The value comes from the message context property BTS.DestinationPartyID.

%DestinationPartyQualifier%

Qualifier of the destination party. The value comes from the message context property BTS.DestinationPartyQualifier.

%MessageID%

Globally unique identifier (GUID) of the message in BizTalk Server. The value comes directly from the message context property BTS.MessageID.

%SourceFileName%

Name of the file from where the File adapter read the message. The file name includes extension and excludes the file path, for example, foo.xml. When substituting this property, the File adapter extracts the file name from the absolute file path stored in the FILE.ReceivedFileName context property. If the context property does not have a value, for example, if message was received on an adapter other than File adapter, then the macro will not be substituted and will remain in the file name as is (for example, C:\Drop\%SourceFileName%).

%SourceParty%

Name of the source party from which the File adapter received the message.

%SourcePartyID%

Identifier of the source party (GUID). The value comes from the message context property BTS.SourcePartyID.

%SourcePartyQualifier%

Qualifier of the source party from which the File adapter received the message.

%time%

UTC time in the format hhmmss.

%time.tz%

Local time plus time zone from GMT in the format hhmmssTZD (for example, 124525+530).

Filed under:

Comments

# BizTalk 2004 Trick: Macros for Constructing Filenames in Files Send Handler

Friday, March 19, 2004 5:40 AM by TrackBack

# re: BizTalk 2004 File Send Handler Macros Bis

Tuesday, March 23, 2004 8:37 AM by Mike B.

how can I assign the value of %SourceFileName% to a variable in an orchestration?

# re: BizTalk 2004 File Send Handler Macros Bis

Wednesday, March 24, 2004 7:30 AM by Mike B.

Found the answer, place the following in an expression:
sourceFileName = IncomingMessage(FILE.ReceivedFileName);

# re: BizTalk 2004 File Send Handler Macros Bis

Monday, April 26, 2004 8:10 PM by MacroMacro

I need a GUID in the output file name that can also be accessed inside the orchestration.

I tried using %MessageID% in the output filename and then using BTS.MessageID in the orchestration. But the two GUIDs are not the same. This might be because when a message is sent via SEND port, a copy of the message is being sent and hence it gets a unique, never before seen GUID.

Any ideas, workarounds ?

I need this functionality for the following scenario: When i receive a file X, I am trying to create a message that says "file X has been received and renamed to GUID-X".

# File names: working with the FTP and FILE adapter

Friday, June 18, 2004 5:22 AM by TrackBack

# Manipulating File Names when working with the FILE

Friday, June 18, 2004 6:59 AM by TrackBack

# re: BizTalk 2004 File Send Handler Macros Bis

Wednesday, July 28, 2004 8:42 AM by Someone

I need a date (i mean a date-macro ;)

# BizTalk 2004 File Send Macro List

Thursday, June 02, 2005 1:23 PM by TrackBack

# Biztalk File Adapter Macros

Tuesday, June 27, 2006 7:17 PM by Pedro Rui Silva

# How To Prepend to the SourceFileName in BizTalk Sample

Wednesday, August 23, 2006 3:22 AM by Stephen W. Thomas BizTalk MVP

Biztalk 2004 provides a variety of built in macros for dynamically naming files. A full list of macros

# re: BizTalk 2004 File Send Handler Macros Bis

Wednesday, August 23, 2006 10:35 AM by BusyB

Great job keep up the good work, and thanks for the help very appreciated.

# BizTalk 2004 File Send Macro List

Monday, August 28, 2006 5:17 PM by Bryan Corazza BizTalk

Here's a list (I got from

Jan's Site) of send macros that I reference all the time. Macro...

# How To Prepend to the SourceFileName in BizTalk Sample

Saturday, October 28, 2006 6:38 PM by Stephen W. Thomas BizTalk MVP

Biztalk 2004 provides a variety of built in macros for dynamically naming files. A full list of macros

# re: BizTalk 2004 File Send Handler Macros Bis

Friday, March 23, 2007 8:50 AM by Lucy! Please call me,Jonny

Lucy! Please call me,Lucy! Please call me

# re: BizTalk 2004 File Send Handler Macros Bis

Saturday, March 24, 2007 6:05 AM by Lucy! Please call me,Jonny

Lucy! Please call me,Lucy! Please call me

# re: BizTalk 2004 File Send Handler Macros Bis

Tuesday, March 27, 2007 10:43 AM by Amit Sunkuru

Are there any Macros for Receive File Handler for BizTalk 2006

# re: BizTalk 2004 File Send Handler Macros Bis

Hi My Name Is ivazqq.