Hi Guys ,
I am facing one issue while using Folder stage to read a particular pattern files .I am explaining my problem with an example .
I have two files of pattern ABC_MMDDYY and ABC_DEF_MMDDYY.
What I need is I have to pick all the files with pattern ABC_MMDDYY . SO what i did in the folder stage I gave the pattern as ABC_*.But its reading all the files including files with pattern ABC_DEF_MMDDYY.
How can read the files only with pattern ABC_MMDDYY.
Any help is appreciated.
Folder stage Pattern
Moderators: chulett, rschirm, roy
Re: Folder stage Pattern
Try to read the file in this way ABC_MMDDYY*
Re: Folder stage Pattern
Pattern ABC_* matches both types of files.kondeti wrote:Try to read the file in this way ABC_MMDDYY*
Create two different folders, one for each file family: f_def_mmddyy and f_mmddyy and place the files accordingly.
What kind of values are in the "_DEF_" portion of the filenames you want to avoid? Not sure how to do this on Windows, but if "DEF" is always character data, then something like this on a UNIX system would work:
You could also use '?' rather than '*' to specify a maximum number of character matches:
The "_DEF_" files would be 'too long' to match that pattern.
Code: Select all
ABC_[0-9]*
Code: Select all
ABC_??????
-craig
"You can never have too many knives" -- Logan Nine Fingers
"You can never have too many knives" -- Logan Nine Fingers
-
- Participant
- Posts: 612
- Joined: Thu May 03, 2007 4:59 am
- Location: Melbourne
I don't think Folder stage will match the pattern the way you want with ABC_[0-9]* or ABC_?????? in Unix environment also. Help document for folder stage says you can use * or 3 dots (...) for pattern matching. I think, an operating system command is not really what the stage is expecting. Be glad to be proven wrong, however!
Joshy George
<a href="http://www.linkedin.com/in/joshygeorge1" ><img src="http://www.linkedin.com/img/webpromo/bt ... _80x15.gif" width="80" height="15" border="0"></a>
<a href="http://www.linkedin.com/in/joshygeorge1" ><img src="http://www.linkedin.com/img/webpromo/bt ... _80x15.gif" width="80" height="15" border="0"></a>
Interesting... to be perfectly honest, all I've ever needed to use was a splat so just made an assumption that it was doing O/S pattern matching. You're right, the help notes only the use of '*' and '...' which implies Universe pattern matching, or so it seems to me.
Anyone done anything other than straight '*' pattern matching in the Folder stage?
Anyone done anything other than straight '*' pattern matching in the Folder stage?
-craig
"You can never have too many knives" -- Logan Nine Fingers
"You can never have too many knives" -- Logan Nine Fingers