Tapatalk

Open all files in a file list

Open all files in a file list

2
NewbieNewbie
2

    Feb 25, 2005#1

    Is it possible to (by a macro) open all files listed in an open UltraEdit window? How do you loop through all the files listed?

    Any help or hints are highly appreciated.

    46
    Basic UserBasic User
    46

      Feb 25, 2005#2

      Yes it should be possible:

      Your macro should look something like that:

      Code: Select all

      Clipboard 9
      Loop 0
      IfEof
      ExitLoop
      EndIf
      SelectLine
      Copy
      Open "^c"
      PreviousWindow
      Key Down
      EndLoop
      Clipboard 0
      I didn't try this code so I'm not sure.
      Let me know if you need help.

      Regards,
      Alain

      P.S: The current file must contain one file per line with full
      path if it's not in the current directory.
      Never forget: "Above the clouds, The sky is blue and the sun shine"

      2
      NewbieNewbie
      2

        Feb 25, 2005#3

        Thank you for your answer.

        It doesn't work though. It claims that the filename "contains an invalid path". It is a correct path without any spaces or special characters. It can be opened manually by right-cklicking on that line. If I put quotes around the complete path it opens the file correctly. PreviousWindow doesn't return to the correct window when more then a few files are open.

        Key Down should be Key DOWN ARROW.

        The remaining problem (that I can't solve or workaround) is how to always return to the window containing the file list.

        Any thoughts on this issue?

        46
        Basic UserBasic User
        46

          Feb 25, 2005#4

          As I said, I never tried to do things like that, so I'm
          surprised that my solution doesn't work.

          The work around I can suggest you is to copy your
          file list in a clipborad and create a temp file each time.
          Sounds like:

          Code: Select all

          SelectAll
          Clipboard 9
          Copy
          Loop 0
          NewFile
          Paste
          Top
          IfEof
          ExitLoop
          EndIf
          SelectLine
          Clipboard 8
          Cut
          SelectAll
          Clipboard 9
          Copy
          CloseFile NoSave
          Clipboard 8
          Open "^c"
          Clipboard 9
          EndLoop
          Clipboard 0
          
          HTH (Hope This Help)
          Alain
          Never forget: "Above the clouds, The sky is blue and the sun shine"

          21
          Basic UserBasic User
          21

            Mar 12, 2005#5

            This should be close to what you want. I dont have time fully debug/test but it may get you started and spark enough of an idea to finish the task.
            InsertMode
            ColumnModeOff
            HexOff
            UnixReOff
            TrimTrailingSpaces
            Bottom
            Key Ctrl+END
            "
            "
            Find RegExp "^p^p"
            Replace All "^p"
            Top
            Loop
            IfEof
            ExitLoop
            EndIf
            StartSelect
            Key END
            IfEof
            ExitLoop
            EndIf
            Copy
            EndSelect
            Key HOME
            Open ""^c ""
            NextWindow
            Key DOWN ARROW
            EndLoop