I want to retrieve files from a folder, while testing the existence of each of these files, and generate empty files if the file in question does not exist without displaying an error message. I am using the tFileExist component, while following the documentation on the official Talend website: https://help.talend.com/reader/Fa7iBFy6fRgEvdHqg85dYQ/QFh2k28YZ6scCHDV85SCkA. But the thing is that even if the file exists, it overwrites it and replaces it with an empty file.
How to create empty file if file does not exist
1.1k Views Asked by MarTech At
2
There are 2 best solutions below
0
Houssem_B
On
you can do it as below
tFileInputExcel (contains the list of all your file names) --> tmap --> tFlowToIterate --> tFileExist (you put the the directory path / the variable created in tFlowToIterate that contains the file name) ------run if trigger ( you put the condition of non existance) ---> tFileTouch (put the directory path / the variable created in tFlowToIterate that contains the file name)
in my case I put tFileCopy Instead of tFiletouch

Related Questions in FILE
- Saving FileSystemInfo Array to File
- C programming: Create and write 2D array of files as function
- How can I change a specific line in a file with node js?
- Grabbing Edits from two strings
- In Android, would it be possible to open a file in the 'values' folder and to read its content?
- Using paths bonded to a XCode project to be shared
- Why am i getting these invalid characters before my file data?
- Optimum directory structure for large number of files to display on a page
- C Reading binary file with fread()
- Renaming a File() object in JavaScript
- How to write the current time to a new line of a .txt file on php execution
- introduce c++ into html
- How can I create a simple text file on a windows phone (8.1) that can be accessed trough USB cable?
- Pop-up and download zip file in ASP.NET
- Using access() in C
Related Questions in TESTING
- How does Robot's Telnet library work?
- Behat doesn't load extensions?
- Load additional CONFIG file with values
- rails controller test failing non-deterministicly wrt state leak (I think)
- Ordering tests using trial twisted
- Unexcepted failed Gavel/Dredd test
- How to use Jasmine and CucumberJS with Protractor
- Django login tests session problems
- How to mock specific RequireJs dependencies while unit testing
- Test case for WCF REST Service
- how to test this business logic
- Protractor - How to get first or last CHILD value
- Factory Not Registered in rspec but found in console
- Pick out certain lines from files
- Selenium stops running after click() function runs
Related Questions in ETL
- Monolithic ETL to distributed/scalable solution and OLAP cube to Elasticsearch/Solr
- How to use component javascript in the Pentahoo Data Integration
- SSIS ETL parallel extraction from a AS400 file
- ETL Hangs - SQL Server in EC2 Machine + SSIS + AWS RDS SQL Server
- Pull Text file to SQL server 2008 table
- SqlAlchemy get all strings (don't cast to boolean or datetime)
- Best / simplest way to transfer data from one Oracle database to another
- Using blank-line delimited records and colon-separated fields in awk
- SSIS dynamic columns validation
- Is it possible to pass parameter inside With Clause in SQL Server SSIS Job?
- Easiest way to import a simple csv file to a graph with OrientDB ETL
- forwarding data from one source to another in real time
- SSIS Variable Scope Issues
- OrientDB ETL with self joined mysql table
- loop row by row from an excel file map to variable
Related Questions in TALEND
- Talend Open Studio for Big Data
- How to extract data from web api with Talend Open Studio
- Send Json Request Using tRestClient With Nested Object in talend
- Get column name ( Meta Data ) Talend
- How to concatenate two column in talend tMap
- Condition on lookup Talend
- Put File Mask on tFileList Component dynamically
- import Data from Excel to MongoDB in Talend
- Talend Open Studio: maven to add librairies
- Unauthorized error in Talend REST Client
- Build option is not working in Talend Job
- Handle tS3Connection failure in Talend
- Talend > NullPointerException on tFileUnarchive
- Talend TRestClient: geocoding and combination of both flows (rows) afterwards
- Connection failure. You must change the jdbc7.jar at org.talende
Related Questions in DATA-EXTRACTION
- Data extract security in Tableau
- Web scraping with python and selenium
- Python: How to extract data in text file based on class information from another text file?
- Data Extraction using Regex
- How to sum duplicated values in SQL
- VBA Script pull data from website
- How can I extract dynamically loaded items from a PDF file?
- Creating a VBA Macro to Extract Data for matches
- Request multiple elements from Adobe's SiteCatalyst using Java
- Extract data from STATIC HTML FILE using python 3.5
- find mapping link url and link text using php
- Web Data Extraction / Screen Scraping (Open Source)
- How to convert UTF-8 string to byte[] in u-sql custom Extractor?
- Extract all the data from Android - Galaxy J5 (J500FN) Failure: Custom binary blocked by FAP
- How to extract several sets of dynamic number from string in C++?
Trending Questions
- UIImageView Frame Doesn't Reflect Constraints
- Is it possible to use adb commands to click on a view by finding its ID?
- How to create a new web character symbol recognizable by html/javascript?
- Why isn't my CSS3 animation smooth in Google Chrome (but very smooth on other browsers)?
- Heap Gives Page Fault
- Connect ffmpeg to Visual Studio 2008
- Both Object- and ValueAnimator jumps when Duration is set above API LvL 24
- How to avoid default initialization of objects in std::vector?
- second argument of the command line arguments in a format other than char** argv or char* argv[]
- How to improve efficiency of algorithm which generates next lexicographic permutation?
- Navigating to the another actvity app getting crash in android
- How to read the particular message format in android and store in sqlite database?
- Resetting inventory status after order is cancelled
- Efficiently compute powers of X in SSE/AVX
- Insert into an external database using ajax and php : POST 500 (Internal Server Error)
Popular Questions
- How do I undo the most recent local commits in Git?
- How can I remove a specific item from an array in JavaScript?
- How do I delete a Git branch locally and remotely?
- Find all files containing a specific text (string) on Linux?
- How do I revert a Git repository to a previous commit?
- How do I create an HTML button that acts like a link?
- How do I check out a remote Git branch?
- How do I force "git pull" to overwrite local files?
- How do I list all files of a directory?
- How to check whether a string contains a substring in JavaScript?
- How do I redirect to another webpage?
- How can I iterate over rows in a Pandas DataFrame?
- How do I convert a String to an int in Java?
- Does Python have a string 'contains' substring method?
- How do I check if a string contains a specific word?
I don't believe that example from Talend is correct: the description doesn't match what is being built.
The "On Subjob Ok" branch is going to run as long as the tFileExist component runs ok, regardless of the result of that component. You would need to add a 2nd "if" branch to the tFileExist component (without the negation in the logic of the other if branch) and add the appropriate components to those 2 "if" branches. The "On Subjob Ok" branch can be deleted.