Skip to main content
simply more productive
The Data Specialist

✅ Easy data integration - import/export
✅ No programming required thanks to visual modeling
✅ Simple ETL tool with versatile options

Flowheater Chart

get current read filename

  • FlowHeater-Team
  • avatar Topic Author
  • Offline
  • Admin
  • Admin
More
13 years 3 months ago #2279 by FlowHeater-Team
get current read filename was created by FlowHeater-Team
Hi,

I very often need to use parts of the current input filename inside the logic of the transformation. Mostly the file might actually contain a date that has some significance and that I would need to parse out and use in the output. I assumed maybe a "global" parameter to be available (since I am calling via the Batch interface and I use the //ReadFileName [file] command line to pass in the file I need to process). Is this ReadFileName visible somehow, to be used? And if yes - could you maybe give a quick explanation?

Thank you.
Heinz
Request via email

Best wishes
Robert Stark

Please Log in or Create an account to join the conversation.

  • FlowHeater-Team
  • avatar Topic Author
  • Offline
  • Admin
  • Admin
More
13 years 3 months ago #2280 by FlowHeater-Team
Replied by FlowHeater-Team on topic Re:get current read filename
Hello Heinz,

For obtaining the current READ file name into the transformation you need the help of the .NET Script Heater and the little script below.
Code:
public object DoWork() { // get access to the READ TextFile Adapter TextFileAdapter adapter = (TextFileAdapter)AdapterRead; // return the filename for further processing return adapter.Filename; }

You have to move just one .NET Script Heater on the Designer. Double-click on the Heater and replace the default script with the Script above. The .NET Script Heater returns now the current file name.

Best wishes
Robert Stark

Please Log in or Create an account to join the conversation.

Time to create page: 0.126 seconds
FlowHeater Logo
FlowHeater - The Data Specialist
Efficient data integration and transformation with FlowHeater – the perfect solution for a seamless transfer of your data.
Legal information
Support & Contact
Contact

Phone:
0951 / 9933 9792

eMail:
info@flowheater.net


Copyright © 2009-2026 by FlowHeater GmbH. All rights reserved.