I wanted to know if we can control the name of the while using tCreateTemporaryFile component:
I want to create a file with name "TEST.txt"
This component always adds ".tmp" as extention by default.
Is there a way to stop adding ".tmp" as extention.
I already tried keeping spaces in "Suffix" field, and it still adds ".tmp" in the file. (See attached"
Solved! Go to Solution.
I've tested the component and to change the extension of the temporary file, just put the extension in the suffix field.
See attached image.
Thanks for the response,
I am able to change the extension using suffix field in the component, If I keep the suffix field empty, It adds ".tmp" by default which is what I don't want.
If should just create "MyName" as per below example, but what it does is, It creates a file "MyName.tmp"
From what I understand, you need the temporary file to be generated without extension.
By default the component is prepared to use the ".tmp" extension when the parameter is not passed.
I did a test and put as a parameter a blank and the file was generated without any extension.
I believe that is what you need. Right ?
Thank you, Evando
Thanks for your help,
Actually, What I was expecting is that component should not add ".tmp" as extension if suffix is kept blank.
In this case file name should be "MyName" instead of "MyName.tmp"
It was working fine until i was running my job in windows but it is not working in Linux.
here is the explanation on the same:
Windows specifically does not accept filenames that end with a dot (.) or a space (" ").
You can even try it right now in your Windows UI/File explorer. If you try to rename a file with a dot or a space at the end, it will throw a warning asking you if you want to follow through with change and then promptly change the filename to a state without the dot or the space.
So when the job runs on Windows, the component/job server changes the filename to end with a dot and a space per the (" ") suffix, but then Windows promptly changes it back. Hence why you see filenames that look like they've been copied from the FTP.
This trick is not really creating the file with exact same name.
Is there any other way, I can resolve the issue?