Component folder

One Star

Component folder

Good morning.

Is there any component that counts the number of files that are in a folder?

I need to be stored in a variable, the number of records that exist in a folder and not how.

Thank you very much.

Moderator

Re: Component folder

Hi,

Please take a look at a component TalendHelpCenter:tFileList which iterates on files or folders of a set directory.
You can use the global variableSmiley Sad(Integer)globalMap.get("tFileList_2_NB_FILE")). It counts the number of files found.

Best regards
Sabrina
--
Don't forget to give kudos when a reply is helpful and click Accept the solution when you think you're good with it.
One Star

Re: Component folder

xdshi wrote:

Good Morning,

First, thank you very much for your reply.

I stored in a global variable in a tJava this: context.numeroImagenes = ((Integer) globalMap.get ("tFileList_1_NB_FILE"));

The problem is that stored me: (1,2,3,4) and I just need the last value.

You can store only the last value?

thank you!
Good Morning,

First, thank you very much for your reply.

I stored in a global variable in a tJava this: context.numeroImagenes = ((Integer) globalMap.get ("tFileList_1_NB_FILE"));

The problem is that stored me: (1,2,3,4) and I just need the last value.

You can store only the last value?

thank you!
Hi,

Please take a look at a component TalendHelpCenter:tFileList which iterates on files or folders of a set directory.
You can use the global variableSmiley Sad(Integer)globalMap.get("tFileList_2_NB_FILE")). It counts the number of files found.

Best regards
Sabrina

15TH OCTOBER, COUNTY HALL, LONDON

Join us at the Community Lounge.

Register Now

2019 GARNER MAGIC QUADRANT FOR DATA INTEGRATION TOOL

Talend named a Leader.

Get your copy

OPEN STUDIO FOR DATA INTEGRATION

Kickstart your first data integration and ETL projects.

Download now

What’s New for Talend Summer ’19

Watch the recorded webinar!

Watch Now

Best Practices for Using Context Variables with Talend – Part 4

Pick up some tips and tricks with Context Variables

Blog

How Media Organizations Achieved Success with Data Integration

Learn how media organizations have achieved success with Data Integration

Read

Definitive Guide to Data Quality

Create systems and workflow to manage clean data ingestion and data transformation.

Download