Arjen,
This is one of the most frequent requests, and there are a number of ways of doing it, depending on whether you want a GUI or console result.

Rather than repeat them here, try searching the forums for "progress bar" to pick up the previous threads. You'll find quite a few (I got 40 hits), and the ones in the UDF library forum are probably the best place to start.