Hi,
I have a job to modify filenames of files(pdf) from source with static data inserted in the fourth component of file name such that it will have the following format
TAC_CAT_time/date_Op2_uniqueID.pdf. The filenames will already contain TAC_CAT_DATE_unique ID.pdf. thus Op2 (case sensitive) is missing. The TAC and CAT components are 8 and 9 characters long respectively. I have figured out all of the above, except that when the MRN or HAR are not within 8 or 9 characters long i need to generate a error. Sometimes these components are keyed in wrong by users. How do I filter these files? to generate a email.
So in effect the 28th character in my filename needs to "_".
The problems still persists. There is just one file each ( one from the filter and other from reject) moved to the destination folders. Why is this?. I have no clue why just one file is moved to the destination although the job says otherwise.
For tfilecopy1:
Filename is : ((String)globalMap.get("tFileList_1_CURRENT_FILEPATH"))
Destiantion Filename : ((String)globalMap.get("tFileList_1_CURRENT_FILE")).substring(0,19)+((String)globalMap.get("tFileList_1_CURRENT_FILE")).substring(23,27)+((String)globalMap.get("tFileList_1_CURRENT_FILE")).substring(19,23)+"_"+"Op2"+"_"+((String)globalMap.get("tFileList_1_CURRENT_FILE")).substring(32,((String)globalMap.get("tFileList_1_CURRENT_FILE")).length())
--------------------------------------------------------------------------
For tfilecopy 3: Filename is : ((String)globalMap.get("tFileList_1_CURRENT_FILEPATH"))
Destiantion : Local drive.
I know you suggested using routines but I haven't. Still there is no explanation to why just a single file gets moved but not the rest
Ok, the tlogrows shows the rejects and filtered files according to the condition specified in tfilterrows. I have merely replace the tlogrows with tfilecopy in the earlier example.
When I hit ctrl+space in Tfilecopy destination rename should I be choosing "((Integer)globalMap.get("tFilterRow_3_NB_LINE_OK"))"... but what is the Integer part?.
OK I think the input file name is in the column name that comes out of tFilterRow - that's why it's displayed in tLogRow. Does the file that's being created look like any of the names you're expecting?
yes in the tfilecopy( good files) i see one file with the modifications I have specified. Similarly in tfilecopy(reject files), I see one file that is not according to specifications. So of the 20 rows processed 9 are bad and 11 good. Problem: I see just one of each category in their respective destinations.