Can we get the current filepath without the filename?

Highlighted
Nine Stars

Can we get the current filepath without the filename?

This gives us the folder path and the file name:
(String)globalMap.get("tFileList_1_CURRENT_FILEPATH")
This gives us the file name:
(String)globalMap.get("tFileList_1_CURRENT_FILE")
Is there a way to get only the folder path stopping before the file name?
Seven Stars

Re: Can we get the current filepath without the filename?

(String)globalMap.get("tFileList_1_CURRENT_FILEDIRECTORY")
If you look in the Outline window, you can see all the globalMap variables each component in your job creates. You can drag and drop these into fields in your job.
You can also in any field, use Ctrl+Space to bring up a similar list, which you can filter by typing, from which to select an available globalMap or context variable.

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

Why Companies Move to the Cloud: 7 Success Stories

Learn how and why companies are moving to the Cloud

Read Now