This scenario describes a one-component Job that calls a system routine to create
an empty file with the date and time of creation in the file name.
Procedure
In the Palette, click File > Management, then drop a tFileTouch component onto the
workspace.
This component allows you to create an empty file.
Double-click the component to open its Basic settings
view in the Component tab.
In the File Name field, enter the path to the file to be
created between double quotes, or click [...] and browse
to an existing file, and modify the file name if needed.
Add a plus symbol (+) in the File Name field.
Press Ctrl+Space to open a list of all of the routines,
and in the auto-completion list which appears, select
TalendDate.getDate to use the Talend routine which allows you to obtain the
current date.
Modify the format of the date provided by default, if required.
Information noteWarning: If you are working on Windows, the ":" characters in the
time format are not allowed in file names and must be removed or replaced.
Add another plus symbol (+) and then enter the file extension between double
quotes.
Press F6 to run the Job.
Results
The tFileTouch component creates an empty file with the
creation date and time in the file name as specified in the File
Name field.
Did this page help you?
If you find any issues with this page or its content – a typo, a missing step, or a technical error – please let us know!