Creating multiple Windows URL shortcuts from a bookmarks HTML file Creating multiple Windows URL shortcuts from a bookmarks HTML file google-chrome google-chrome

Creating multiple Windows URL shortcuts from a bookmarks HTML file


Hmm, in combination with a tool like everything that would be usefull, only you will need to do the operation regularly. I suppose it must be possible to get your source right from chrome, anyway here is a script that does what you ask for.

Const ForReading = 1, ForWriting = 2, ForAppending = 8, CreateIfNeeded = trueoutpath = "g:\script\shortcut\url2\"Set objFSO = CreateObject("Scripting.FileSystemObject")bookmarkfile = "bookmarks.html"Set bookmarks = objFSO.OpenTextFile(bookmarkfile, ForReading)Set regEx = New RegExpregEx.Global = TrueSet regEx2 = New RegExpregEx2.Global = TrueregEx2.Pattern = "[^a-zA-Z0-9-_.]"regEx.Pattern = "<DT><A HREF=""(.*)"" ADD_DATE.*>(.*)</A>"do until bookmarks.AtEndOfStream  line = bookmarks.readline()  if regEx.test(line) then    shortcut = regEx.Replace(line,"$1")    filename = trim(regEx.Replace(line,"$2"))    filename = Regex2.Replace(filename, "_")    filename = outpath & left(filename, 80) & ".url"    wscript.echo filename    'the following skips invalid filenames, you should add a routine to filter out invalid filename characters in your codeset    on error resume next    Set objFile = objFSO.OpenTextFile(filename, ForWriting, CreateIfNeeded)    if err.number <> 0 then      wscript.echo err.description    end if    objFile.write "[InternetShortcut]" & vbcrlf & "URL=" & shortcut    objFile.close  end ifloop


- This works really geat -

I exported CHROME BOOKMARKS (also did this to my GOOGLE BOOKMARKS) as a single .html file. This can be done in Chrome through the bookmark manager's ORGANIZE | EXPORT dropdown.I then opened my USER\Favorites folder. I don't use IE so it had all the default links IE comes with. I created a new folder called CHROME BOOKMARKS.I opened IE and clicked the star shaped FAVORITES button. I pulled the ADD TO FAVORITES menu down and selected IMPORT AND EXPORT.This launched an import wizard. I told it I was importing Favorites, and directed it to the .html file Chrome exported (#1), and told it to import to the CHROME BOOKMARKS folder I created (#2).

This created a .url file for each bookmark I had in Chrome which included both the BOOKMARKS BAR and the OTHER BOOKMARKS.

I tested and confirmed that a .URL file is launched in Chrome by double clicking or by drag and drop.

-This answer is from your question at superuser -