cancel
Showing results for 
Search instead for 
Did you mean: 
cancel
Showing results for 
Search instead for 
Did you mean: 

CSV Parser

Highlighted

CSV Parser

Can anyone suggest me, when there are multiple files in the repository(for ex: XYZ_01FEB,XYZ_02FEB something like this) and i'm using the CSV Parser Read File functionality,how can i make sure my service is reading each file. For example every 5 min the new file will get added to the repository.So how can i read each file here when the naming convention changes(timestamp gets appended to the file eachtime a new file gets placed).

?

3 REPLIES 3

Re: CSV Parser

You should leverage FileRepository methods in order to list files and act accordingly:

  1. ListFiles({ path: "" }
  2. Iterate over previous list files
  3. For instance once a file it's processed, remove or move to another folder with:
    1. DeleteFile({ path: "" })
    2. MoveFile({ sourcePath: "", overwrite: true/false, targetPath: "" })

 

Re: CSV Parser

Hi !

 

I did not get this.

2. Iterate over previous list files

Could you please explain me this still more.May be with some example code. Since the file names are different i'm not able to do this.

Re: CSV Parser

Hi,

How we can use the listfile function to read a filename appended with
timestamp.
Should we use some pattern matching?