cancel
Showing results for 
Search instead for 
Did you mean: 

Dynamic folder name (when reading file in file adapter)

Former Member
0 Kudos

Hi,

I have to read a file always with the same name but it can be in different directories.

For example:

FTPHome/Folder1/file.txt

FTPHome/Folder2/file.txt

I've tried to define a mask for path name but it doesn't work:

Something like this /FTPHome/Folder*/

It's possible to do that what I'm trying

Accepted Solutions (1)

Accepted Solutions (1)

Former Member
0 Kudos

to be honest I don't know how to do this with a mask..

but you can have multiple adapters polling the different directories. You can also keep the same interface and sender for each. Even use the same receiver determination.

You just make separate sender agreements for your comm channels and then in the receiver field enter anyname. This way you can use all of the same information and objecvts you already created.

Former Member
0 Kudos

Thanks Alex,

But when using file adapter I'm not creating a sender agreement. And my problem is that I don't want to create 1 communication channel for each folder... but looks like it's the only solution

Former Member
0 Kudos

Hi ,

You dont have to create communication channel for each folder you have the option of adding folders to file adapters check for advance section in file adapters.

Thanks

Sudharshan

Former Member
0 Kudos

Sudharshan nice... indeed you are right! You learn something everyday

Advanced Selection for Source File

If you want to set an exclusion mask for the File Name specified above, or if you want to specify multiple directories using a file name mask and exclusion mask, set the Advanced Selection for Source Fileindicator.

○ Specify an Exclusion Mask for the file name specified above.

You want to process all files that have the extension '.txt', but want to exclude all files that begin with the letter 'a'. To do this, enter .txt for File Name, and a for Exclusion Mask.

○ You can enter additional specifications for source directories, file names, and exclusion masks in the table. This data is processed in addition to the details specified above.

Edited by: Alex on Jul 8, 2008 11:11 AM

Former Member
0 Kudos

Thanks Sudharshan, that worked.

I didn't regarded you until today, sorry.

Edited by: Marshal Oliveras on Jul 14, 2008 8:58 AM

Answers (2)

Answers (2)

Former Member
0 Kudos

Hi Marshal,

If the folders from which you want the file to be picked up is fixed,then you can mention it in the File Access parameters in the Sender Communication channel.

You can mention the source directory and filename in the Sender communication channel.Then check the Advanced selection for Source File check box.Now you can list the directory names and the filenames which you want the sender channel to poll for.

Hope this helps.

Thanks and Regards,

Induja

Former Member
0 Kudos

Hi ,

Please check these blogs to deal with dynamic folder and file name.

Dynamic File Name Part 1

Dynamic File Name Part 2

Thanks

Sudharshan