I'm moving my sites into WordPress and need to verify the redirects are correct. With more than 2000 pages to check, it would take forever if I had to click on each link and open them in a browser.
Instead, I used a batch file. Two batch files actually, one for IE and one for Firefox. (I had to make sure the pages looked good in both browsers too.)
Each page is in the batch file formatted like this:
START http://www.domain.com/p.htm
@choice /T 130 /C y /CS /D y
START tells the batch to use the default program for the file type. The second line adds a delay (130 seconds) so I have time to view the page and make sure everything is correct and it gives me a little time to make changes if needed. I found 130 seconds is just about right – long enough to give me time to look at the page and make small edits before the next page took focus as it loaded. It also gave me enough time to finish editing pages that needed more editing. If I'm ready for a new page before 130 seconds, I can click on the CMD window and press Y to load the next page.
It's my experiece that the browsers and my cxomputer become sluggish with more than, oh, 30 pages open at once so this gives me time to review and close pages. Also, opening more than 5 at once is also sluggish, so while I may not use the @choice command after every page, I will add it by every 5th page.
I also turned my monitor on its side and used Portrait mode so I could view most pages in full, with very little scrolling required.
The code for Firefox is
Start "" "C:Program Files (x86)Mozilla Firefoxfirefox.exe" http://www.domain.com/
@choice /T 130 /C y /CS /D y"C:Program Files (x86)Mozilla Firefoxfirefox.exe" http://www.domain.com/p2.asp
@choice /T 130 /C y /CS /D y
The first line uses START "" to run the page in Firefox and once Firefox is open, the subsequent lines open a new tab in the browser, START is not required. (The path to the browser and page is on one line, @choice is on the next line.)
Now all I need is a list of the URLs – I have a directory.asp file I pull those from. I paste the list into Excel and use search and replace and Excel formulas to get the URLs usable and add the @choice command, then paste it into notepad and save as a batch (*.bat) file.