0

I am new to B2B DX, using since 2 months. I have a requirement where files are getting generated in dynamic folder. For eg. File name is 20170503test.txt then it will get generated in /2017_05/20170503/20170503test.txt.

The next day means tomorrow it will get generated in /2017_05/20170504/20170504test.txt. So how my endpoint can pick these files as they are getting generated in different folders? So what I can set file pattern is *test.txt. But how endpoint can go in different directories?

halfer
  • 19,824
  • 17
  • 99
  • 186
Deep
  • 342
  • 3
  • 12

1 Answers1

0

If you go high enough in the target file system, there will be a single directory which is common among all the target files... even if it is the root directory... set your target folder to that. Then in the mapping itself, create a special FileName port on your target... this will dynamically set the name of the output file to whatever value this port is set to so you can fully qualify the string you set this to to include the full dynamic file path up until that shared directory described above.

Daniel Machet
  • 615
  • 1
  • 5
  • 7
  • It will put files there with the help of mapping but I want to pick up files from these locations. I am already using mapping to create and put files in subfolders under root folder. I want my endpoint to pick up files. – Deep May 04 '17 at 13:06
  • On the session task, mappings tab, Source qualifier, set the Source File Type to indirect then have the full file path written within the file specified by the Source Filename parameter (you can populate this file at the same time as creating the dynamically located input file i.e. in the same mapping) – Daniel Machet May 04 '17 at 19:29