Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]
Groups > alt.comp.os.windows-10 > #181682
| From | Marion <marion@facts.com> |
|---|---|
| Newsgroups | alt.comp.os.windows-10, alt.msdos.batch, alt.msdos.batch.nt |
| Subject | Working batch script to append to the browser-independent global bookmarks file |
| Date | 2025-01-23 23:14 +0000 |
| Organization | BWH Usenet Archive (https://usenet.blueworldhosting.com) |
| Message-ID | <vmuih8$1go0$1@nnrp.usenet.blueworldhosting.com> (permalink) |
Cross-posted to 3 groups.
So that everyone benefits from every post, here is a working script that
appends to the global system-wide bookmark file any link you'd like to add.
@echo off
REM addbm.bat adds another link to the global bookmark file
setlocal
setlocal EnableDelayedExpansion
REM #1 Set your favorite text or HTML editor
REM set editor=notepad++
set editor=gvim
REM #2 Set the location of your global bookmark HTML file
set bmfile=C:\path\to\global\bookmarks\file\bm.htm
echo.Global bookmark file is %bmfile%
:input_html
echo.Enter URL: ; e.g., https://amazon.com/vine/about
set /p "url="
echo.Enter Description: ; e.g., Amazon Vine Program
set /p "description="
echo.Adding... "%url%" as "%description%"
:append_html
echo.^<A HREF="%url%"^>%description%^</A^>^<P^> >> %bmfile%
echo."%url%" as "%description%" added to "%bmfile%"
:edit_html
echo Do you want to edit the global bookmark file? [y/n]
set /p "choice="
if /i "%choice%"=="y" (
echo Editing file: %bmfile%
%editor% %bmfile%
) else if /i "%choice%"=="n" (
echo File editing canceled.
)
pause
endlocal
As always, please improve so that billions of people can use this script.
As a Usenet goal is to learn from others & further improve their results.
Note that a longer more detailed thread on this topic can be found here:
*How to edit HTML source file on Windows in one step (not two)?*
<https://www.novabbs.com/computers/article-flat.php?id=84218&group=alt.comp.os.windows-10#84218>
Back to alt.comp.os.windows-10 | Previous | Next — Next in thread | Find similar | Unroll thread
Working batch script to append to the browser-independent global bookmarks file Marion <marion@facts.com> - 2025-01-23 23:14 +0000 Re: Working batch script to append to the browser-independent global bookmarks file Marion <marion@facts.com> - 2025-01-24 01:13 +0000 Re: Working batch script to append to the browser-independent global bookmarks file "R.Wieser" <address@is.invalid> - 2025-01-24 08:32 +0100
csiph-web