PDA

View Full Version : How to get the file name?.



kettle_anonymous
06-08-2006, 04:39 AM
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

MattCasters
06-08-2006, 04:44 AM
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

MattCasters
06-08-2006, 05:28 AM
short_filename and path were both added to the output of step "Get Filenames".

Matt