Leave feedback
  • Question

    How to identify a text file in a folder having also table files.

Enter a new topic
  • Raveesh Singh Raveesh Singh
    0 likes 752 views

    Dear all,

    I am looking into a possible solution where requirement is to read the extention of a text file where only file name should be starting from say "AB" and need to convert that into a .tbl file to read by a streamServe. and in the same table folder there are many other .tbl files are available.

    OR 

    For above issue, Is there any way to idetify the file name Starting from say "AB" and with extention .txt to use the content as a table file.

    Please help.

     

    Regards,

    Raveesh.

    Wednesday 12 February, 2014
  • Andreas Hjelle Andreas Hjelle
    0 likes

    Hi Raveesh,

    Have you had a look at the strTok function? It is very handy for splitting strings on for instance "/" or "\" or ".". Last instance woud give file name and extention.

    Scanning directories for lists of files can be done by external tools (bat file to list files in directory) or by using the custom java DirScanInput connector that returns a list of files in the scanned directory, without processing the files.

    Regards,

    andreas

    Wednesday 12 February, 2014
  • Raveesh Singh Raveesh Singh
    0 likes

    Dear Andreas,

    Thanks for your guidance. I was trying to fix this issue with different approach. I testing this solutio n with shell script. will share udpate with you if successed.

     

    Regards,

    Raveesh

    Thursday 13 February, 2014
  • Raveesh Singh Raveesh Singh
    0 likes

    Dear Andreas,

    Thanks for your guidance. I am trying to fix this issue with different approach. I testing this solution with shell script. will share udpate with you if successed.

     

    Regards,

    Raveesh

    Thursday 13 February, 2014