Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
((String)globalMap.get("tFileList_1_CURRENT_FILEPATH")).replaceAll("\\.txt$", "") + ".zip"
((String)globalMap.get("tFileList_1_CURRENT_FILE"))
Hi,
Un-check the "All Files" option in tFileArchive component. Once this is done, use the current file from the tFileList as the "Filemask" for the tFileArchive component.
Archive file:((String)globalMap.get("tFileList_1_CURRENT_FILEPATH")).replaceAll("\\.txt$", "") + ".zip"
replaceAll is used to remove the file extension, which in this case is ".txt" so that the archive files are created as "text1.zip" and not "text1.txt.zip".
Filemask:((String)globalMap.get("tFileList_1_CURRENT_FILE"))
This will ensure that the tFileArchive is archiving only the current file.
Attaching screen shots.
Regards,
Abhi
((String)globalMap.get("tFileList_1_CURRENT_FILEPATH")).substring(0,((String)globalMap.get("tFileList_1_CURRENT_FILEPATH")).length()-4).replaceAll("\\.TXT", "") + ".zip"