Skip to Content

Create some folders with the current date

Hi experts,

Before that my file adapter generate a file I need to create some directories with the current date.

Using this format /DIR/DEV/SYSTEM/OUT/$YEAR/$MONTH/$DAY/

I could use the command mkdir -p /DEV/ISOLDA/OUT/$(date "+%Y")/$(date "-%m")$(date "-%d")/ on the adapter option Run Operating System Command After Message Processing.

At the moment I can't try it.

What do you think about this? Could do I this?

Thanks in advance and Regards,

Jose Antonio.

Add comment
10|10000 characters needed characters exceeded

  • Get RSS Feed

5 Answers

  • Best Answer
    Oct 29, 2008 at 02:43 PM

    there are two ways to do this,

    1. OS command - Easy way, but no monitoring capability to confirm if the folder was created via XI's central monitoring.

    2. Dynamic Configuration - Need to write a snippet of code to implement this but better from a monitoring perspective.

    https://blogs.sap.com/?p=41013 - this is for the file name, similarly u can access the directory also.

    http://help.sap.com/saphelp_nw04/helpdata/en/43/03612cdecc6e76e10000000a422035/frameset.htm

    Add comment
    10|10000 characters needed characters exceeded

  • Oct 29, 2008 at 02:36 PM

    José,

    You can try Dynamic Configuration by creating Dynamic Directory name ! Did you tried that option?

    raj.

    Add comment
    10|10000 characters needed characters exceeded

  • avatar image
    Former Member
    Oct 29, 2008 at 02:41 PM

    You can use shell script.Call the script from OS command..

    Add comment
    10|10000 characters needed characters exceeded

  • Oct 29, 2008 at 02:54 PM

    I use the Dynamic Configuration on others java map. But for this interface I use a Message Mapping. Then I can't use Dynamic Configuration.

    I hope that the OS command run 😉

    Very thanks to all

    Add comment
    10|10000 characters needed characters exceeded

  • Oct 29, 2008 at 03:10 PM

    There is one more option too, you can do it with Java Proxy also. Create a simple Java Proxy for your receiver side and create the folder as you mentioned.

    Add comment
    10|10000 characters needed characters exceeded