US and Worldwide: +1 (866) 660-7555
Results 1 to 3 of 3

Thread: How to get the file name?.

  1. #1
    Join Date
    Sep 2005
    Posts
    1,404

    Default How to get the file name?.

    Hi


    I am using Get filenames and I am able to see all the files that are there in my source folder.



    I am using Wildcard (AA_Te*.*$) it is showing the file name with full path.



    Now my requirement is I want to get the filename from there, not the path



    Like



    I am Getting: E:\Data\PREPROCESSED\AA_Test_20060608.txt based on above Wildcard



    But I need: AA_Test_20060608.txt



    Here one more constraint is there I am not allowed to take this file name based on length, it may vary from time to time



    Like today my filename is: AA_Test_20060608.txt
    By next day it might be: AA_Testaa_20060609.txt



    Please let me know how to do this?



    Thanks



    Sas

  2. #2
    Join Date
    Nov 1999
    Posts
    9,534

    Default RE: How to get the file name?.

    Can I ask ask you to write a short simple piece of javascript to do this?

    I'll add field short_filename and path (why not) later to help you.

    Matt
    Matt Casters, Chief Data Integration
    Pentaho, Open Source Business Intelligence
    http://www.pentaho.org -- mcasters@pentaho.org

    Author of the book Pentaho Kettle Solutions by Wiley. Also available as e-Book and on the Kindle reading applications (iPhone, iPad, Android, Kindle devices, ...)

    Join us on IRC server Freenode.net, channel ##pentaho

  3. #3
    Join Date
    Nov 1999
    Posts
    9,534

    Default RE: How to get the file name?.

    short_filename and path were both added to the output of step "Get Filenames".

    Matt
    Matt Casters, Chief Data Integration
    Pentaho, Open Source Business Intelligence
    http://www.pentaho.org -- mcasters@pentaho.org

    Author of the book Pentaho Kettle Solutions by Wiley. Also available as e-Book and on the Kindle reading applications (iPhone, iPad, Android, Kindle devices, ...)

    Join us on IRC server Freenode.net, channel ##pentaho

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •