0

So i have a metadatas excel file that contains a list of directories. How can check if every directory exist ? If directory doesn't exist, we add a warning message to a log file.

I tried to combine tExcelInput, tFileList and tFileExist, but i can't make it work.

Thank you.

YOo Slim
  • 54
  • 1
  • 8
  • 2
    Please [edit] your question and show a screenshot of your job. Why did you use tFileExist? Will there be files in the directories? Otherwise you have to add [Java code to check for directories](http://stackoverflow.com/questions/15571496/how-to-check-if-a-folder-exists) in a tJavaRow. – tobi6 Sep 22 '16 at 08:31

1 Answers1

3

YOo Slim,

You can use tFileExist to check for the presence of directories. Just paste the full directory name in the File name/Stream and use OnComponentOk and OnComponentError from the tFileExist to perform any action.

Notes :-

  1. Tested on Windows, haven't tested on Linux

  2. If you use the ... button near the File name/Stream, you will have to select a file. Instead just paste the folder path in the box

  3. The OnComponentOk and OnComponentError wont give you a lot of options when you drag it. However if you create a subjob and then try to connect using these options, it should allow you. For me OnComponentOk points to a tJava and OnComponentError points to a subjob with a tRowGenerator connected to a tLogRow. (describing coz i can't upload an image)

-Renju MAthews