Favorites

  • Thread starter Thread starter Dick
  • Start date Start date
D

Dick

I have approximately 200 "favorites" web sites. I wish to
print out the entire list along with their web site
addresses. Some of these web sites are bundled together
under files that are also under "Favorites". Ex.
Under "Government", I may have 10 different web sites.

Thanks for any help
 
I made the following batch script for that exact function.
Tested in Windows 2000 / 2003 / XP

The script is 4 lines total.

- Line 1 creates a list of your "Favorites" files in a temporary file named DIRLIST.TMP

! IMPORTANT !
Copy and paste the script into any text editor (i.e. Notepad)
Be sure to include the entire script as each character is important.
Edit this script and change the path in line 1 to the location of your favorites folder.
"C:\Documents and Settings\foldername\Favorites"

- Line 2 reads the file names and contents line-by-line from DIRLIST.TMP
It writes each file name and url to a file named FAVORITES-LIST.TXT
(see example below)

- Line 3 deletes the temporary file DIRLIST.TMP

- Line 4 pauses the script to allow you to see the actions it performed
(it is not required and may be removed)

:::: START OF SCRIPT ::::

@DIR/B/S "C:\Documents and Settings\foldername\Favorites" > DIRLIST.TMP
@FOR /F "DELIMS=" %%A IN (DIRLIST.TMP) DO @ECHO %%A >> FAVORITES-LIST.TXT & @TYPE "%%A" | FINDSTR/B "URL=" >> FAVORITES-LIST.TXT
@Del DIRLIST.TMP
PAUSE

::::: END OF SCRIPT :::::

Line 2 may appear to be broken into more than one line on screen.
It starts with
@FOR /F "DELIMS="
and ends with
"URL=" >> FAVORITES-LIST.TXT

The file
Favorites.txt
is created in the same folder where you run this batch file.

---- START OF SAMPLE OUTPUT FILE ----

C:\Documents and Settings\AMH\Favorites\Hilltop Lab.url
URL=http://www.rlmueller.net/
C:\Documents and Settings\AMH\Favorites\Microsoft Technet.url
URL=http://www.microsoft.com/technet/

----- END OF SAMPLE OUTPUT FILE -----

If you want any changes made, just ask.

Austin M. Horst
 
Back
Top