cancel
Showing results for 
Search instead for 
Did you mean: 

Loop through a Directory to read multiple Files

Former Member
0 Kudos

Hi,

I have a folder, where i will be having multiple files with below file format.

ABC_2015-09-01

ABC_2015-09-02

ABC_2015-09-03

I want to load all these files into a same target .Can you tell me how can do this

Accepted Solutions (1)

Accepted Solutions (1)

former_member187605
Active Contributor
0 Kudos

No need for a loop, just use a wildcard for the filename in the source file format, e.g. ABC_2015-09-*.

Former Member
0 Kudos

Thanks Dirk, Can i do this using a global variable ??

i will just pass my file format string into the Variable. will that work ?

Former Member
0 Kudos

when i try this logic, to pass through parameter, job is failing.

it says cannot open the file

\\sharedpath\ABC_*

former_member187605
Active Contributor
0 Kudos

In Source File Editor:

1/. Specify the path in Root Directory.

2/. Put the filename with wildcard (or the global variable with that content) in File Name(s). And don't forget to include the file suffix!!! Chances are high your files are called ABC_*.txt or ABC_*.csv, aren't they?

Former Member
0 Kudos

This is working now Dirk. i missed the file extension:(

Thanks for ur help

Former Member
0 Kudos

What if I want to load all files from the folder..? irrespective of matching pattern.

-Thanks in advance

Vaishaali

former_member187605
Active Contributor
0 Kudos

What about *.*?

Former Member
0 Kudos

Perfect..

Former Member
0 Kudos

Hello Dirk, Could you please elaborate the options when we drag an IDoc from datastore to designer workspace..?

Thanks in advance.

Answers (1)

Answers (1)

prabhu-2020
Member
0 Kudos