Site icon

Putting directory.asp and batch commands together in Excel

These are the steps I used to get a usable URL and create the code I needed for the batch file, in only a few minutes - using Excel.

  1. Open directory.asp in a browser.
  2. View source.
  3. Copy the section with the URLs.
  4. Paste into Excel

The code will look like this:

Use Find and Replace to replace

with your domain name:

  1. Use text to columns command to remove the remaining HTML, with " as the delimiter (type the quote symbol in the Other: field) then click Finish.
  2. Delete all columns except the one with the full URL.
  3. In a column after the url, fill with numbers 1 down to the last url.
  4. Copy the numbers and paste below the last number.
  5. In the URL column, next to the 1 in the number column, paste @choice /T 130 /C y /CS /D y (change 130 to the desired seconds)
  6. Drag to fill, down to the last number.
  7. Sort by the number column
  8. Copy the URL/@choice column and paste into Notepad
  9. Save with the bat extension
  10. Double click to run.

Before sort screenshot (Steps 3 - 6):

After sorting, copy the URL column and paste into Notepad.

Use Search and replace, either in Excel or Notepad, to replace Start with the path to Firefox, then add Start to the first line of the batch file and save.

Exit mobile version