Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
Hi All,
I want to delete some zip files after my Job completition process. I am taking a Path like "C:/Users/aghosh46/Desktop/SRCFILES" in the context Variable of Parent Job. and Now Passing that Value to ChildJob for File Deletions in tpostjob. Here in tfilelist giving Directory Name as context.FilePath+"/". In tfiledelete using filelist's Global Variable Current Filepath. Strange Part is when tpostjob starting that FileDeletion Child Job is failing saying Filename.zip can not be deleted. Whereas In a testJob without any contexts The Job is deleting the Zip Files.Dont know where I am missing something.
I cannot reproduce the issue. Maybe remove the +"/" ?
getting error some thing like in attached.One More thing in tfilelist I gave context.filepath+"/" in my testJob. In there also it is working perfectly fine. @shong
Also, if your parent job is passing the directory, it would more than likely pass it using "\" instead of "/." Under advanced settings in the tFileList, check "Format file path to slash(/) style"
Hi @yilengli,
From My Parent job Directory passing like Value "C:/Users/aghosh46/Desktop/SRCFILES" which is in context.filepath. Now This will be a user given Path.One More thing In the FileWatcher Component tWaitforFile I am using FilePath as context.filepath+"/" which is working absolutely fine. I have tried using that settings also which U mentioned.I also removed "/" in the tfilelist Directory. Not working still. still that same error is coming
Exception in component tFileDelete_1 (J_CON_NADL_BRAND_EXTRACT_FILEDELETE)
java.lang.RuntimeException: File C:\Users\aghosh46\Desktop\SRCFILES\AVEENO_EMAIL_CAMP_SEND_OPENS_11012017_TO_12312017.zip can not be deleted.
Hi,
Please provide your job screen if possible.
Regards,
It is taking the slash /, but its printing the actual path recognized by the operating system. The "/" is just a java preference because "\" is an escape character.