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.