Tapatalk

List all open documents

List all open documents

2
NewbieNewbie
2

    May 28, 2014#1

    Hope someone can help with this, I can see no built in way to do this, so is there a script that can list the full path of all open documents?

    6,685587
    Grand MasterGrand Master
    6,685587

      May 28, 2014#2

      You do not need a script for this task. You can run Find in Files with an empty search string and Open files selected to get a list of file names of all open files in output window or a results window.

      This Find in Files feature is used by function GetListOfFiles.

      But you also don't need this function for opened files, as there is the JavaScript object UltraEdit with an array of document objects which have the string property path containing the full name of the file with path.

      Here is a small script example outputting the names of all opened files into the output window.

      Code: Select all

      UltraEdit.outputWindow.showWindow(true);
      for (var nDocIndex = 0; nDocIndex < UltraEdit.document.length; nDocIndex++)
      {
         UltraEdit.outputWindow.write(UltraEdit.document[nDocIndex].path);
      }
      You may be also interested in the general file name evaluating functions.

      If you are a beginner on writing UltraEdit scripts, open View - Views/Lists - Tag List and select at top the group UE/UES Script Commands. You see a full list of all special UltraEdit scripting commands and properties with a short explanation which can be inserted into the file with a double click. The JavaScript core objects, their methods and properties are not included in this list.
      Best regards from an UC/UE/UES for Windows user from Austria

      2
      NewbieNewbie
      2

        May 29, 2014#3

        Dear Mofi, many thanks – you are a wonderful help for all on this forum. That's exactly what I was looking for, and other good tips besides.

        15
        Basic UserBasic User
        15

          Feb 14, 2018#4

          Is there any way to write the file paths into a new blank document rather than the output window?

          6,685587
          Grand MasterGrand Master
          6,685587

            Feb 15, 2018#5

            Yes, by enabling advanced option Results to edit window (click gearwheel button to see it) in Find in Files window before executing the find.
            Best regards from an UC/UE/UES for Windows user from Austria