Do not input private or sensitive data. View Qlik Privacy & Cookie Policy.
Skip to main content

Announcements
Qlik Connect 2026! Turn data into bold moves, April 13 -15: Learn More!
cancel
Showing results for 
Search instead for 
Did you mean: 
_AnonymousUser
Specialist III
Specialist III

[resolved] Create Folder in Job

Good Morning,
I am using a tFtpGet for a file and upload it to another ftp by tFtpPut component.
To do this, I need to create a temporary folder does not exist, which make the intermediate step.
How can I do it?
Thank you so much.
Labels (2)
1 Solution

Accepted Solutions
Anonymous
Not applicable

Define a context variable called directorypth and set its value which is the directory path you want to create.  In the begin of job, using a tJava and write this code to create a directory.
new java.io.File(context.directorypath).mkdirs();

on tFTPGet or tFTPPut, you can set the Local Directory filed with context variable.
In the end of job, you can use tFileDelete to delete the directory if needed.
Best regards
Shong

View solution in original post

2 Replies
Anonymous
Not applicable

Define a context variable called directorypth and set its value which is the directory path you want to create.  In the begin of job, using a tJava and write this code to create a directory.
new java.io.File(context.directorypath).mkdirs();

on tFTPGet or tFTPPut, you can set the Local Directory filed with context variable.
In the end of job, you can use tFileDelete to delete the directory if needed.
Best regards
Shong
_AnonymousUser
Specialist III
Specialist III
Author

Define a context variable called directorypth and set its value which is the directory path you want to create.  In the begin of job, using a tJava and write this code to create a directory.
new java.io.File(context.directorypath).mkdirs();

on tFTPGet or tFTPPut, you can set the Local Directory filed with context variable.
In the end of job, you can use tFileDelete to delete the directory if needed.
Best regards
Shong

Thank you very much for your answer, I found it very useful.
Regards.