This paper focuses on packet routing in Delay Tolerant Networks (DTNs) where end-to-end connectivity is intermittent. It studies routing policies for transferring files when packets arrive progressively at the source node. It analyzes the optimality conditions for routing policies in terms of delivery probability and delay. It proposes piecewise-threshold policies that perform better than existing work-conserving policies, especially when there is an energy constraint. It extends the analysis to coded packets generated using linear block codes and rateless coding. Numerical results show piecewise-threshold policies have higher efficiency than work-conserving policies.