Sorry... didn't read the question correctly. It's an interview question. Anyway....
Having an example on how to delete a directory, in a non-recursive manner, misses the point. Remember back to your old algorithms class? when you first learned about recursion? Remember all that work that you did prior to using recursion, with stack based data structures, to do stuff, that became really easy once you added recursion to your arsenal?
That's the point of the interview question. The interview was likely
testing you to see if you understood the basics of recursion, which includes an understanding on how to do recursion, without the language making it so easy for you to do it -- to simulate it using data structures.
Henry