This could be done with an UltraEdit macro or better with an UltraEdit script.
But I use for testing hyperlinks free tool Xenu's Link Sleuth. It is very easy to use. It can be used offline and online. It is a simple tool which consists of a small EXE, a help (CHM) and an INI file. And it can be even used directly from a USB storage media. Last, it is also very fast.