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

add text before the text in text file

Expand Messages
  • batch_lover
    Hi, I know that this echo stuff note.txt ads text under the text already in note.txt Is there a way to add text before the text that s already in
    Message 1 of 7 , Aug 2, 2010
    • 0 Attachment
      Hi,

      I know that this " echo stuff >>note.txt " ads text under the text already in note.txt

      Is there a way to add text before the text that's already in note.txt ?

      Thank you in advance.
    • Karl Springer
      On 2 Aug 2010 at 15:41 -0000, batch_lover wrote, at least in ... ren note.txt oldnote.txt echo stuff note.txt type oldnote.txt note.txt del /q oldnote.txt
      Message 2 of 7 , Aug 2, 2010
      • 0 Attachment
        On 2 Aug 2010 at 15:41 -0000, batch_lover wrote, at least in
        part:

        > I know that this " echo stuff >>note.txt " ads text under
        > the text already in note.txt
        >
        > Is there a way to add text before the text that's already in
        > note.txt ?

        ren note.txt oldnote.txt
        echo stuff > note.txt
        type oldnote.txt >> note.txt
        del /q oldnote.txt

        Karl
      • batch_lover
        Thanks for the code ! I forgot to ask, ... text in txt file add my text here text in txt file ... This seems pretty difficult...
        Message 3 of 7 , Aug 2, 2010
        • 0 Attachment
          Thanks for the code !

          I forgot to ask,

          I would also add text between 2 text areas like this:

          -----------------
          text in txt file

          add my text here

          text in txt file
          ----------------

          This seems pretty difficult...


          --- In batchworld@yahoogroups.com, "Karl Springer" <bi434@...> wrote:
          >
          > On 2 Aug 2010 at 15:41 -0000, batch_lover wrote, at least in
          > part:
          >
          > > I know that this " echo stuff >>note.txt " ads text under
          > > the text already in note.txt
          > >
          > > Is there a way to add text before the text that's already in
          > > note.txt ?
          >
          > ren note.txt oldnote.txt
          > echo stuff > note.txt
          > type oldnote.txt >> note.txt
          > del /q oldnote.txt
          >
          > Karl
          >
        • foxidrive@lavabit.com
          On Tue, 03 Aug 2010 01:28:32 -0000, batch_lover ... It depends on what text you are adding and where it is going - IE the context of the replacement. You can
          Message 4 of 7 , Aug 2, 2010
          • 0 Attachment
            On Tue, 03 Aug 2010 01:28:32 -0000, "batch_lover"
            <batch_lover@...> wrote:

            >
            >
            >Thanks for the code !
            >
            >I forgot to ask,
            >
            >I would also add text between 2 text areas like this:
            >
            >-----------------
            >text in txt file
            >
            >add my text here
            >
            >text in txt file
            >----------------
            >
            >This seems pretty difficult...

            It depends on what text you are adding and where it is going - IE the
            context of the replacement.

            You can read the file and locate specific parts, then add text, and
            continue to read the file - but details about the text are needed.
          • Karl Springer
            On 3 Aug 2010 at 1:28 -0000, batch_lover wrote, at least in ... Assuming that I understand correctly what you want... File definitions: - txt in txt file =
            Message 5 of 7 , Aug 2, 2010
            • 0 Attachment
              On 3 Aug 2010 at 1:28 -0000, batch_lover wrote, at least in
              part:

              > I forgot to ask,
              >
              > I would also add text between 2 text areas like this:
              >
              > -----------------
              > text in txt file
              >
              > add my text here
              >
              > text in txt file

              Assuming that I understand correctly what you want...

              File definitions:
              - txt in txt file = note.txt
              - add my txt file = new.txt
              - output file = note.txt

              copy note.txt oldnote.txt
              type new.txt >> note.txt
              type oldnote.txt >> note.txt
              del /q oldnote.txt

              Karl
            • batch_lover
              Its OK I found the solution ! Thanks anyway ;)
              Message 6 of 7 , Aug 3, 2010
              • 0 Attachment
                Its OK I found the solution ! Thanks anyway ;)


                --- In batchworld@yahoogroups.com, "Karl Springer" <bi434@...> wrote:
                >
                > On 3 Aug 2010 at 1:28 -0000, batch_lover wrote, at least in
                > part:
                >
                > > I forgot to ask,
                > >
                > > I would also add text between 2 text areas like this:
                > >
                > > -----------------
                > > text in txt file
                > >
                > > add my text here
                > >
                > > text in txt file
                >
                > Assuming that I understand correctly what you want...
                >
                > File definitions:
                > - txt in txt file = note.txt
                > - add my txt file = new.txt
                > - output file = note.txt
                >
                > copy note.txt oldnote.txt
                > type new.txt >> note.txt
                > type oldnote.txt >> note.txt
                > del /q oldnote.txt
                >
                > Karl
                >
              • Parag Doke
                Requesting you to share it if possible with this group for the benefit of all. Thanks in advance, Parag Doke ... -- Parag Doke Save paper, save trees. Do not
                Message 7 of 7 , Aug 3, 2010
                • 0 Attachment
                  Requesting you to share it if possible with this group for the benefit of
                  all.

                  Thanks in advance,
                  Parag Doke

                  On Wed, Aug 4, 2010 at 8:18 AM, batch_lover <batch_lover@...> wrote:

                  >
                  >
                  >
                  >
                  > Its OK I found the solution ! Thanks anyway ;)
                  >
                  >
                  > --- In batchworld@yahoogroups.com <batchworld%40yahoogroups.com>, "Karl
                  > Springer" <bi434@...> wrote:
                  > >
                  > > On 3 Aug 2010 at 1:28 -0000, batch_lover wrote, at least in
                  > > part:
                  > >
                  > > > I forgot to ask,
                  > > >
                  > > > I would also add text between 2 text areas like this:
                  > > >
                  > > > -----------------
                  > > > text in txt file
                  > > >
                  > > > add my text here
                  > > >
                  > > > text in txt file
                  > >
                  > > Assuming that I understand correctly what you want...
                  > >
                  > > File definitions:
                  > > - txt in txt file = note.txt
                  > > - add my txt file = new.txt
                  > > - output file = note.txt
                  > >
                  > > copy note.txt oldnote.txt
                  > > type new.txt >> note.txt
                  > > type oldnote.txt >> note.txt
                  > > del /q oldnote.txt
                  > >
                  > > Karl
                  > >
                  >
                  >
                  >



                  --
                  Parag Doke
                  Save paper, save trees. Do not print emails/documents unless absolutely
                  necessary.


                  [Non-text portions of this message have been removed]
                Your message has been successfully submitted and would be delivered to recipients shortly.