How to open files specified in file with file protocol url (file:///)?

How to open files specified in file with file protocol url (file:///)?

3
NewbieNewbie
3

    Mar 07, 2016#1

    Hi All,

    I'm wondering if UE supports a way similar to using a URL like this one: "file:///C:/MyFolder/myfile.txt" to open files. I see that if I right-click a URL having "http://..." the top of the context menu has a command to open the URL.

    Thanks in advance! - Fred

    115
    Power UserPower User
    115

      Mar 07, 2016#2

      If an open file contains a fully qualified file name like this:

      c:\userdata\text\2016\Mar\session.log (can be quoted or not quoted)

      if you put your cursor anywhere on the file name and right-click on it the first line in the context menu will be Open "c:\userdata\text\2016\Mar\session.log" which you can select to have UltraEdit open a new tab for the file.

      If you have this "file\\\c:\userdata\text\2016\Mar\session.log" it will still work. But if you use the / character instead of the \ it will not work on a Windows PC running UltraEdit because it is not recognized as a valid file name. This leads me to believe that you have to use the proper directory delimiters for the operating system you are running on.

      3
      NewbieNewbie
      3

        Mar 07, 2016#3

        Hi and thanks!

        That is great news! I'm trying to use UE more than ever for speed and this is a big deal because I need to reference and open files quite often!

        I appreciate you helping me out!

        All the best - Fred

        6,688586
        Grand MasterGrand Master
        6,688586

          Mar 07, 2016#4

          The correct directory delimiter for the file protocol (a Microsoft invention) is the forward slash.

          UltraEdit recognizes by chance already a wrong coded file protocol url like file:///C:/MyFolder/myfile.txt because of being read as C:/MyFolder/myfile.txt and kernel functions used by UltraEdit on checking if such a file really exists replace automatically each forward slash by a backslash.

          But a right coded file protocol url like file:///C|/My%20Folder/myfile.txt for C:\My Folder\myfile.txt is not recognized by UltraEdit as such an url must be really first decoded.

          However, an UltraEdit script could be written which analyzes string at current caret position, converts the file protocol url in memory to a file name string with path and opens the file with or without checking first if such a file really exists.
          Best regards from an UC/UE/UES for Windows user from Austria