Opening a remote text file in Notepad++?

Collapse
X
 
  • Time
  • Show
Clear All
new posts
  • torbengb
    Visitor
    • May 2007
    • 3

    Opening a remote text file in Notepad++?

    I sometimes want to open a text file in Notepad++, from within BC4. The "Open with" setting works fine for local files but when I want to open a remote file (SFTP) in NPP then NPP opens but does not open any file.

    In BC, I specify the open with command as:
    "C:\Program Files (x86)\Notepad++\notepad++.exe" "%f"
    to indicate the path to NPP as well as a full file path %f. This opens NPP but it does not open the remote file. Same if I specify a relative path %F instead. Both variants work when I do the same on a local file instead.

    I'm guessing that BC4 keeps some kind of local temp copy of the remote file, and I should perhaps pass *that* to NPP instead. Would that work?

    --> How should I reference a remote file, so that it opens in NPP? Where does BC store its temp files?

    Edit:
    I think that BC stores its temp files in `D:\Users\USERNAME\AppData\Local\Temp\BC41E0D.tmp` but not in an accessible way; it's not evident what these temp files really are. I'm stuck.
    Last edited by torbengb; 07-Jun-2017, 07:26 AM. Reason: Where does BC store its temp files?
  • Aaron
    Team Scooter
    • Oct 2007
    • 16017

    #2
    Hello,

    That would work, but BC4 does not currently support passing temp files. We would also need to manage detecting when the external task is complete, so the temp file could be re-saved back to the original (if that is even possible given the remote protocol). This type of feature is something on our wishlist. Our current support supplies the absolute path to the remote location, which some applications (like BC4 itself) can support. The temp file generation you see is for external conversions or downloads for content comparisons, which are all internal to BC4.
    Aaron P Scooter Software

    Comment

    • torbengb
      Visitor
      • May 2007
      • 3

      #3
      Thank you for that explanation, Aaron!
      For what it's worth, WinSCP does exactly what you've got on your wishlist: it sends the local temp copy of the remote file to the external editor and monitors that temp file; when it's saved by the editor, WinSCP automagically copies the new state of the temp file back to the remote side. It's very elegant.

      As for BC4, you say that BC4 supplies the path to the remote file; does that mean that the external editor would itself need an open SFTP connection in order to access the remote path that is supplied? (I guess few editors have that capability, Notepad++ certainly doesn't.)

      Comment

      • Aaron
        Team Scooter
        • Oct 2007
        • 16017

        #4
        Right. It's not expected for every program to support it, but Open With can call any program (not just Editors), so the path is supplied as best we can.
        Aaron P Scooter Software

        Comment

        Working...