bsharath
asked on
Add each and every web address in a txt file to the Ie favorites.
Hi,
Add each and every web address in a txt file to the Ie favorites.
i have these in a txt file
www.google.com
www.yahoo.com
Can anyone help me with a script that can add all into the favorites in my ie.
Regards
Sharath
Add each and every web address in a txt file to the Ie favorites.
i have these in a txt file
www.google.com
www.yahoo.com
Can anyone help me with a script that can add all into the favorites in my ie.
Regards
Sharath
SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
oh sorry t0t0. I wasn't aware you are helping this user already. I should really refresh the screen before posting. :-)
Well in any case bsharath if you want an alternative, my script is VBS and instructions are above.
Well in any case bsharath if you want an alternative, my script is VBS and instructions are above.
Hubasan...
It's not a problem.... we're working from two different approaches... it'll be interesting to see which method (if not both) the asker chooses....
It's not a problem.... we're working from two different approaches... it'll be interesting to see which method (if not both) the asker chooses....
If you want to work with your original list of URLs such as:
www.google.com
www.yahoo.com
then save your list as URL.TXT and run the modified batch file.
@echo off
set destination=%userprofile%\ favorites
for /f "tokens=*" %%a in (url.txt) do (
for /f "tokens=2 delims=." %%b in ("%%a") do (
if not exist "%destination%\%%b.url" (
echo [DEFAULT]
echo BASEURL=http://%%a
echo [InternetShortcut]
echo URL=http://%%a
echo IDList=
echo IconFile=
echo IconIndex=1
echo [{000214A0-0000-0000-C000- 0000000000 46}]
echo Prop3=19,2
)>"%destination%\%%b.url"
)
)
NOTE: This will create two entries in your favorites menu:
Yahoo
Google
by creating the following two files in your 'favorites' folder:
Yahoo.url
Google.url
If you want to change these entries to something like "My Yahoo" and My Google" then you need to change the following two lines:
if not exist "%destination%\%%a.url" (
)>"%destination%\%%b.url"
to:
if not exist "%destination%\My %%a.url" (
)>"%destination%\My %%b.url"
(see where I slipped the 'My ' into those lines? You can customise this if you want to)
www.google.com
www.yahoo.com
then save your list as URL.TXT and run the modified batch file.
@echo off
set destination=%userprofile%\
for /f "tokens=*" %%a in (url.txt) do (
for /f "tokens=2 delims=." %%b in ("%%a") do (
if not exist "%destination%\%%b.url" (
echo [DEFAULT]
echo BASEURL=http://%%a
echo [InternetShortcut]
echo URL=http://%%a
echo IDList=
echo IconFile=
echo IconIndex=1
echo [{000214A0-0000-0000-C000-
echo Prop3=19,2
)>"%destination%\%%b.url"
)
)
NOTE: This will create two entries in your favorites menu:
Yahoo
by creating the following two files in your 'favorites' folder:
Yahoo.url
Google.url
If you want to change these entries to something like "My Yahoo" and My Google" then you need to change the following two lines:
if not exist "%destination%\%%a.url" (
)>"%destination%\%%b.url"
to:
if not exist "%destination%\My %%a.url" (
)>"%destination%\My %%b.url"
(see where I slipped the 'My ' into those lines? You can customise this if you want to)
Sorry! Re-submitted due to typo....
If you want to work with your original list of URLs such as:
www.google.com
www.yahoo.com
then save your list as URL.TXT and run the modified batch file.
@echo off
set destination=%userprofile%\ favorites
for /f "tokens=*" %%a in (url.txt) do (
for /f "tokens=2 delims=." %%b in ("%%a") do (
if not exist "%destination%\%%b.url" (
echo [DEFAULT]
echo BASEURL=http://%%a
echo [InternetShortcut]
echo URL=http://%%a
echo IDList=
echo IconFile=
echo IconIndex=1
echo [{000214A0-0000-0000-C000- 0000000000 46}]
echo Prop3=19,2
)>"%destination%\%%b.url"
)
)
NOTE: This will create two entries in your favorites menu:
Yahoo
Google
by creating the following two files in your 'favorites' folder:
Yahoo.url
Google.url
If you want to change these entries to something like "My Yahoo" and My Google" then you need to change the following two lines:
if not exist "%destination%\%%b.url" (
)>"%destination%\%%b.url"
to:
if not exist "%destination%\My %%b.url" (
)>"%destination%\My %%b.url"
(see where I slipped the 'My ' into those lines? You can customise this if you want to)
If you want to work with your original list of URLs such as:
www.google.com
www.yahoo.com
then save your list as URL.TXT and run the modified batch file.
@echo off
set destination=%userprofile%\
for /f "tokens=*" %%a in (url.txt) do (
for /f "tokens=2 delims=." %%b in ("%%a") do (
if not exist "%destination%\%%b.url" (
echo [DEFAULT]
echo BASEURL=http://%%a
echo [InternetShortcut]
echo URL=http://%%a
echo IDList=
echo IconFile=
echo IconIndex=1
echo [{000214A0-0000-0000-C000-
echo Prop3=19,2
)>"%destination%\%%b.url"
)
)
NOTE: This will create two entries in your favorites menu:
Yahoo
by creating the following two files in your 'favorites' folder:
Yahoo.url
Google.url
If you want to change these entries to something like "My Yahoo" and My Google" then you need to change the following two lines:
if not exist "%destination%\%%b.url" (
)>"%destination%\%%b.url"
to:
if not exist "%destination%\My %%b.url" (
)>"%destination%\My %%b.url"
(see where I slipped the 'My ' into those lines? You can customise this if you want to)
ASKER CERTIFIED SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
ASKER
Thank U
Thank you....
You need two pieces of information to create each favorites link:
1) the name of the link
2) the URL of the web page
STEP 1 - Create a text file (URL.TXT) containing a comma-delimited list such as:
My Google,http://www.google.com
My Yahoo,http://www.yahoo.com
STEP 2 - Copy the code below into notepad and save as MKURL.BAT
@echo off
set destination=%userprofile%\
for /f "tokens=1,* delims=," %%a in (url.txt) do (
if not exist "%destination%\%%a.url" (
>"%destination%\%%~a.url" echo [DEFAULT]
>>"%destination%\%%~a.url"
>>"%destination%\%%~a.url"
>>"%destination%\%%~a.url"
>>"%destination%\%%~a.url"
>>"%destination%\%%~a.url"
>>"%destination%\%%~a.url"
>>"%destination%\%%~a.url"
>>"%destination%\%%~a.url"
)
)
STEP 3 - Ensure both files are in the same directory then run the batch file: MKURL
This will create two files in:
C:\Documents and Settings\...\Favorites\
in the current user's profile named:
My Google.url
My Yahoo.url
STEP 4 - Fire up Internet Explorer and check out the favorites.
This should get you on your way.....