You're still not being very clear -- do you want just the directories one level below $hardPath or all directories below $hardPath? Do you want $hardPath included for each entry in the array or do you just want the part of the path that is below $hardPath? For example, given "$hardPath/foo/bar" do you want "$hardPath/foo" or "$hardPath/foo"
"$hardPath/foo/bar"? And do you want "$hardPath/foo" or just "foo"? That ambiguity is why you have been getting downvotes on your question.