Skip to main content

Apologies if this question is a bit newby...I'm only an occasional FME user...

I've downloaded a zip from Ordnance Survey containing .csv files called, for example,

HP40.csv

HP60.csv

HT82.csv

HT84.csv

SE00.csv

SE02.csv

SE04.csv

SD06.csv

SD08.csv

TA00.csv

TA02.csv

I have a CSV reader looking in

C:\\OS_Open_Names\\Latest_Source\\*.zip\\**\\DATA\\*.csv which will read all the .csv files.

Is there a way I can update a single reader to read only the SE, SD and TA files?

Thanks

Yes, I think you can using this as the Reader source:

C:\\OS_Open_Names\\Latest_Source\\*.zip\\**\\DATA\\S*.csv,C:\\OS_Open_Names\\Latest_Source\\*.zip\\**\\DATA\\T*.csv


Hi @matt_yw, this filter expression could also work.

C:\OS_Open_Names\Latest_Source\*.zip\**\DATA\{SE,SD,TA}*.csv

See also here: Directory and File Pathnames Reader Parameters | Special Characters Supported in the Path Filter


Yes, I think you can using this as the Reader source:

C:\\OS_Open_Names\\Latest_Source\\*.zip\\**\\DATA\\S*.csv,C:\\OS_Open_Names\\Latest_Source\\*.zip\\**\\DATA\\T*.csv

Thanks @erik_jan

 


Hi @matt_yw, this filter expression could also work.

C:\OS_Open_Names\Latest_Source\*.zip\**\DATA\{SE,SD,TA}*.csv

See also here: Directory and File Pathnames Reader Parameters | Special Characters Supported in the Path Filter

 

Thanks @takashi for the answer and the link to the documentation.

Hi @matt_yw, this filter expression could also work.

C:\OS_Open_Names\Latest_Source\*.zip\**\DATA\{SE,SD,TA}*.csv

See also here: Directory and File Pathnames Reader Parameters | Special Characters Supported in the Path Filter

I couldn't get this approach to work in the end - it only seems to work if it's folder names within the {}. For files I think I need to use the approach @erik_jan  proposed.

Yes, I think you can using this as the Reader source:

C:\\OS_Open_Names\\Latest_Source\\*.zip\\**\\DATA\\S*.csv,C:\\OS_Open_Names\\Latest_Source\\*.zip\\**\\DATA\\T*.csv

Seems to require , instead of ;


Seems to require , instead of ;

Sorry, you are right. I will change this in the answer.

Reply