Easily open url's in notepad++

  • Jbee11

    Jbee11 - 2014-02-02

    Hi guys,

    When an url is opened through the open file dialog box in notepad++, a copy of the web page is loaded to temporary internet files and the data displayed.

    What I'm trying to achieve is to create a list of links to web pages that could be loaded to notepad++ in the aforementioned manner. To clarify, I want the url's to be opened in notepad++, not the default browser (which results if I use explorer plugin to create the links). As I have several url's that need to be fetched frequently, I dislike the idea that I'd manually copy paste the link I need to the open file dialog.

    I'm not sure if it's possible to build a script that "simulates" an url entered in the Open file-dialog or what would be the best way to approach the problem?

    Any help would be highly appreciated as I'm losing my mind over this presumably simple problem :)


  • Andreas Jonsson

    Andreas Jonsson - 2014-02-02

    Personally, I'd just use a command-line program such as cURL or wget to download the file, and then get Notepad++ to open it. This can be scripted using an ordinary Windows batch file.

    First install cURL ( http://curl.haxx.se/download.html ). Then save this as "whatever.bat" and double-click on it to run:

    @echo off
    REM Download first file and open it.
    curl -o %TMPFILE%  http://notepad-plus-plus.org/
    "C:\Program Files (x86)\Notepad++\notepad++.exe" %TMPFILE%
    REM Download second file and open it.
    curl -o %TMPFILE%  http://www.slashdot.org
    "C:\Program Files (x86)\Notepad++\notepad++.exe" %TMPFILE%
    goto :EOF
    set TMPFILE=%TMP%\npptempfile-%RANDOM%-%TIME:~6,5%.html

    You can bind a hotkey in N++ to the batch file etc.

    Last edit: Andreas Jonsson 2014-02-02
  • Jbee11

    Jbee11 - 2014-02-02

    Thank you very much Andreas!