folder creation

One Star

folder creation

Hello,
I would like to create a folder with Talend and I want to name it with day date. Is it possible?
Thank you for your help.
One Star

Re: folder creation

I don't find the solution to create directly a directory.
I use the file touch component with the "create folder if not exist" choice in the property.
just delete the touch file create after.
You can use the currentdate java routine with :
Put this in the filename :
"C:/talend/"+TalendDate.getDate("YYYYMMddhhmmss")+"/test.txt"
In the subjobOk, you can delete the test.txt.
Maybe ther is another solution but I don't know it!
One Star

Re: folder creation

I found the solution :
Use the same file name line but on the tCreateTemporaryFile component :
Directory : "C:/talend/"+TalendDate.getDate("YYYYMMddhhmmss")+"/"
Check the "Delete file after execution"
Uncheck "Use system directory by default"
And that work.
Thanks to learn me this point Smiley Wink
One Star

Re: folder creation

It's just what I needed.
Thank you very much
One Star

Re: folder creation

You're welcome...