@Poremsky.com

Tips & Tricks for Windows, Office, and Whatever

  • Home
  • Windows
  • Office
  • BlackBerry
  • Web Design
  • WordPress
  • Internet Explorer

Open webpages using a batch file

Published on July 11, 2011 Last reviewed on September 28, 2016

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.

Share this:

  • Facebook
  • LinkedIn
  • Twitter
  • Print
Subscribe
Notify of
0 Comments
Inline Feedbacks
View all comments

Recent Posts

  • Change Password or Pin Complexity after removing from Intune
  • Server drafts location is not valid error message
  • What is the Brown File Box Icon on Files in Windows 11?
  • Remove Office Licenses from Windows
  • Add the Recent Items Folder to Windows 10 Quick Access

Recent Comments

  • FUAD on Remove Office Licenses from Windows
  • Brian DuBridge on Add the Recent Items Folder to Windows 10 Quick Access
  • Renee Moodie on Remove Office Licenses from Windows
  • John P on Remove Office Licenses from Windows
  • Puja on Remove Office Licenses from Windows
Privacy & Cookies: This site uses cookies. By continuing to use this website, you agree to their use.
To find out more, including how to control cookies, see here: Cookie Policy

© 2023 · @Poremsky.com

wpDiscuz
Go to mobile version
You are going to send email to

Move Comment