cancel
Showing results for 
Search instead for 
Did you mean: 

Ignoring Microseconds in the Filename

Former Member
0 Kudos

Hello All -

My file generates a filename with OrdersOut20060404-110922-355.xml

Can we ignore the "355" in filename to get the output file OrdersOut20060404-110922.xml if we use the Add Time Stamp in the file adapter?

Thanks,

Tirumal

Accepted Solutions (0)

Answers (3)

Answers (3)

moorthy
Active Contributor
0 Kudos

Hi,

The best option is,get the required file name in the mapping , and map this into the separate field in the target structure, use this name in the varaibale substitution. If you don't want to generate the extra file name field, then you can go with the option of Cut in the Reciever File Content conversion.

Regards,

Moorthy

Former Member
0 Kudos

All -

I will be working on your suggestions and will give you points based on my findings.

Thanks,

Tirumal

Former Member
0 Kudos

Hi Tirumal,

You can also run a shell script on unix which picks up the latest file and renames it as per ur requirement.

In the receiver adapter specify the command to run this script.

This approach minimizes the changes on XI side.

praveen

Former Member
0 Kudos

Hi,

If you need the different date time format, create file name in the payload and use variable substitution to generate the file name required.

Thanks,

Prateek

bhavesh_kantilal
Active Contributor
0 Kudos

Hi Tirumal,

I dont think this is possible. When you say add time stamp, XI internally is going to add the time stamp with the micro seconds. The reason being that it is possible that mutliple files with the same name can be written within the same time interval itself.

If you want to have the time stamp in the format that you want, one way would be to pass the time as a part of your payload and then use variable name subsiituion.

See Variable Name substitutionin this link,

http://help.sap.com/saphelp_nw04/helpdata/en/bc/bb79d6061007419a081e58cbeaaf28/content.htm

Regards,

Bhavesh