So that works. But it can be happen that this file is under another path and not in /etc, so in example in /var/hello/ . Maximum i have 3 or 4 path to search. How can i loop through this and use the path where the file is found? Make a loop and search in /etc and if found use /etc. If not found go further and look at /var/hello and if found use path /var/hello. If not found go furhter and look in /var/test and if found use /var/test. And so on. Any help?