Tapatalk

get file name in text

get file name in text

74
Advanced UserAdvanced User
74

    Oct 14, 2004#1

    Does anyone know how I would insert the name of the file I'm working on into the text file?


    Thanks, Max

    6,685587
    Grand MasterGrand Master
    6,685587

      Oct 14, 2004#2

      In the Edit menu click on Copy File Path/Name. Paste it where you want with Ctrl+V and remove the path.

      Second method is to create a template named "File name" with the template definition [FILE_NAME] oder [FULL_FILE_NAME] and assign a hotkey to this template. See help of UltraEdit about Templates.
      Best regards from an UC/UE/UES for Windows user from Austria

      74
      Advanced UserAdvanced User
      74

        Oct 14, 2004#3

        My text files are already written is there any way to bring this function into a script?

        Top
        CopyFilePath
        Find RegExp "href=__"
        Paste

        :?:

        Thanks, Max

        6,685587
        Grand MasterGrand Master
        6,685587

          Oct 15, 2004#4

          What about

          InsertMode
          ColumnModeOff
          HexOff
          UnixReOff
          Top
          CopyFilePath
          Find RegExp "href=__"
          Replace All "href=^c"

          This would do the job, but the references are not valid html references, although Internet Explorer would execute it.
          Best regards from an UC/UE/UES for Windows user from Austria

          74
          Advanced UserAdvanced User
          74

            Oct 15, 2004#5

            Thank you, I was able to come up with something similar.

            Top
            Loop
            CopyFilePath
            Find "__"
            IfNotFound
            ExitLoop
            EndIf
            Paste
            EndLoop

            2

              Nov 18, 2004#6

              Mofi wrote:In the Edit menu click on Copy File Path/Name. Paste it where you want with Ctrl+V and remove the path.
              How can you remove the path with a macro? Or may be it exist a copy file name without path and extension ?
              Of course the path i want to remove is not the same for all files !

              Can you help me ? My knowledge in UE macro language is as week as my english... i think i can understand but write it :cry:

              Thanks,

              Jean-Marc

              74
              Advanced UserAdvanced User
              74

                Nov 22, 2004#7

                Could you post a couple of examples?

                6,685587
                Grand MasterGrand Master
                6,685587

                  Nov 23, 2004#8

                  Hello Jean-Marc!

                  If you only need the filename without extension, do not use the CopyFilePath command. Use instead a template.

                  Open Advanced - Display/Modify Templates.

                  At the dropdown list at the bottom of the dialog select a not used template number. 0- is default, if you don't have any templates. Enter a template name at top of the dialog, for example "Insert filename". And in the big edit area enter only [FILE_NAME].

                  You can now use the template manually via the menu, the template list, the toolbar or a hotkey or use it in a macro with the command Template 0. 0 is just an example for the template number. If "Insert filename" is assigned to template 6, use Template 6.
                  Best regards from an UC/UE/UES for Windows user from Austria

                  2

                    Nov 24, 2004#9

                    Thanks for your reply. I will try to use a template.

                    kenavo from Brittany

                    Jean-Marc