Skip to Content
avatar image
Former Member

Variable Substitution for Source Directory

Hello,

I have seen several threads about using a UDF and variable substitution for dynamically determining the Target Directory.

Is anyone familiar with (or had to implement) a solution where the Source Directory is dynamically determined.

My challenge is to connect to a different Source Directory name (sy-datum format, ex: 20070920 ) each day on an ftp site and download all the files in the folder to a know target directory. I am doing a simple file-to-file transfer, so no mapping is involved.

Your comments, suggestions and feedback is greatly welcomed.

Thanks,

Ralph

Add comment
10|10000 characters needed characters exceeded

  • Get RSS Feed

3 Answers

  • Best Answer
    avatar image
    Former Member
    Sep 20, 2007 at 09:13 PM

    Ralph,

    Check out this thread..

    Dynamic File adapter configuration the response from satyanarayan...

    Hope this will help.

    Nilesh

    Add comment
    10|10000 characters needed characters exceeded

    • Former Member

      Nilesh,

      Thank you for that link. I had previously viewed that one as well.

      My FTP Sender comm channel looks like:

      Source Directory: /%directoryname%/

      At the bottom, under Advanced Mode, I have:

      Variable: directoryname

      Parameter: systemdate

      I have even attempted using Parameter: 20070920

      which is an actual folder name, but I see it fails in the adapter monitor, unable to change directory.

      I was hoping to avoid extensive java coding for something as simple as this.

      No mapping is used, which would not help any way since I an trying to determine the Source Directory and not the Target.

      Thanks once again.

      Ralph

  • avatar image
    Former Member
    Sep 21, 2007 at 08:06 PM

    Ralph,

    Give a shot by giving source directory as 2/ which means all the directories and its files with start with 2.

    Regards,

    ---Satish

    Add comment
    10|10000 characters needed characters exceeded

    • Former Member

      Hi Satish,

      I have a similar problem (I have a great number of source directories) and I try to apply your solution.

      In source directory I have bust/000*, so I want to read several directories:

      bust/0000001

      bust/0000002

      bust/0000003

      ...

      But it doesn't work.

      Error "FTPEx: bust/000*: No such file or directory

  • avatar image
    Former Member
    Nov 28, 2007 at 08:16 AM

    Hi Ralph,

    I have the same problem.

    Did you find a good solution?

    Thanks,

    Carme

    Add comment
    10|10000 characters needed characters exceeded

    • Former Member Former Member

      Hi, Ralph

      I know batch file could be a solution.

      However, i was looking for another option because of command script it's difficult to monitor and control.

      Thank you very much for your help.

      Carme