cancel
Showing results for 
Search instead for 
Did you mean: 

Read file with changing name

masantiago
New Contributor II

Hello,

First let me preface that i’ve searched on this forum for the right answer, some things seemed like they’d fit but ultimately nothing was exactly what I needed to accomplish my task. I’m hoping it’s a case of missing something obvious.

I have to grab a file every half hour from a folder. I can use file-reader to grab one with no problem and the pipeline all works as expected… BUT. starting this week the files will be dumped with the following pattern.filename_YYYYMMDD:MMSS.txt

the new file will always overwrite the old one, so i just need to tell file reader(or whichever is the right snap) to grab the file matching that pattern. I tried using the pattern technique from the file WRITER but it didn’t work with my reader.

ANY suggestions would be greatly appreciated.

2 REPLIES 2

Supratim
Contributor III

@masantiago
You should start with directory browser with file filter like- fileName_*, then use file reader and config File value as $Path. If you want to use filename in your following snap then you can create 2 pipeline, one with directory browser and pipeline execute snap and another with file reader and your required snaps. You can follow the same pattern mention below topic-

masantiago
New Contributor II

Thanks for the suggestion. I ran into another error with access so i still haven’t tried this but i’ll update if it works out. thanks again.