You can use depth first search if you k now that the number of paths to be covered will be minimal.
If you have to find the shortest path across an nxn room moving right or down only, then the number of paths will be exponential relative to n, therefore a DFS is a very bad idea.
If you have to find the path from node a to node b in a tree with n nodes, then a DFS will be linear in complexity. Since DFS is simpler to code usually, I would suggest a DFS in this case. The complexity of a BFS would be equal to the DFS in this case.