Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
Is there a global variable to get the Directory Name in tCreateTemporaryFile component?
I see tCreateTemporaryFile_1_FILEPATH but there is no variable for Directory.
You already have all the info you need.
If I assume your tCreateTemporaryFile component is named tCreateTemporaryFile_1 and that you are using a Windows system (for the path separators "\"), the code you will need is below....
String directory =
((String)globalMap.get("tCreateTemporaryFile_1_FILEPATH")).substring(0, ((String)globalMap.get("tCreateTemporaryFile_1_FILEPATH")).lastIndexOf("\\"));
You already have all the info you need.
If I assume your tCreateTemporaryFile component is named tCreateTemporaryFile_1 and that you are using a Windows system (for the path separators "\"), the code you will need is below....
String directory =
((String)globalMap.get("tCreateTemporaryFile_1_FILEPATH")).substring(0, ((String)globalMap.get("tCreateTemporaryFile_1_FILEPATH")).lastIndexOf("\\"));
Thanks,
It's good trick.
I wish there was a global variable name for the same something like tCreateTemporaryFile_1_DIRECTORY, as we have "tCreateTemporaryFile_1_FILEPATH"
Yo could always set the directory using a variable. Then you would have access to change it as well as see what it contains