Loading ...
Sorry, an error occurred while loading the content.

save buffer with the same filename, but with different extension

Expand Messages
  • dsjkvf
    hello, and one more question: is it possible somehow to macro the following action -- i want to save an open file FILENAME.EXT1 as FILENAME.EXT2. of course,
    Message 1 of 2 , Nov 6, 2006
    • 0 Attachment
      hello,

      and one more question: is it possible somehow to macro the following
      action -- i want to save an open file FILENAME.EXT1 as FILENAME.EXT2.

      of course, it's no pain at all to do it manually, but since i want to
      add this procedure at the end of a macro, after a number of other
      transformations, it would be very handy to automate this too.

      for now i've tried the following:

      write-buffer $FILE_BASENAME$.EXT2 ; where EXT2 is my new desired extension

      but with no success. so, i'd be very grateful if someone could advise
      me something here...


      thank you :).


      --
      dsjkvf
    • dsjkvf
      ... if anybody is interested: set-variable $FILE_TMPNAME &lef $buffer-bname -4 set-variable $FILE_NEWNAME &cat $FILE_TMPNAME .EXT2 write-buffer $FILE_NEWNAME
      Message 2 of 2 , Nov 6, 2006
      • 0 Attachment
        On 11/6/06, dsjkvf <dsjkvf@...> wrote:
        > and one more question: is it possible somehow to macro the following
        > action -- i want to save an open file FILENAME.EXT1 as FILENAME.EXT2.
        >
        > of course, it's no pain at all to do it manually, but since i want to
        > add this procedure at the end of a macro, after a number of other
        > transformations, it would be very handy to automate this too.

        if anybody is interested:

        set-variable $FILE_TMPNAME &lef $buffer-bname -4
        set-variable $FILE_NEWNAME &cat $FILE_TMPNAME ".EXT2"
        write-buffer $FILE_NEWNAME

        :)


        --
        dsjkvf
      Your message has been successfully submitted and would be delivered to recipients shortly.