Welcome guest. Before posting on our computer help forum, you must register. Click here it's easy and free.

Author Topic: Rename/replace  (Read 32513 times)

0 Members and 1 Guest are viewing this topic.

BillRichardson



    Intermediate

    Thanked: 15
    Re: Rename/replace
    « Reply #15 on: December 31, 2009, 09:49:06 AM »
    Thank you for your insight and patience.

    Learn Sed ( stream editor ).  One simple line of code does it all:

    type _txtfiles.txt   |  sed 's/_/ /g' > newfiles.txt

    ref:

    http://gnuwin32.sourceforge.net/packages/sed.htm

    http://www.computerhope.com/unix/used.htm

    http://www.faqs.org/faqs/editor-faq/sed/

    Bill Richardson

    Salmon Trout

    • Guest
    Re: Rename/replace
    « Reply #16 on: December 31, 2009, 09:51:20 AM »
    bill, will you please shut up about sed.

    ghostdog74



      Specialist

      Thanked: 27
      Re: Rename/replace
      « Reply #17 on: December 31, 2009, 09:55:08 AM »
      Learn Sed ( stream editor ).  One simple line of code does it all:

      type _txtfiles.txt   |  sed 's/_/ /g' > newfiles.txt

      ref:

      http://gnuwin32.sourceforge.net/packages/sed.htm

      http://www.computerhope.com/unix/used.htm

      http://www.faqs.org/faqs/editor-faq/sed/


      that's only part of the story! you need to rename your files....

      ghostdog74



        Specialist

        Thanked: 27
        Re: Rename/replace
        « Reply #18 on: December 31, 2009, 09:57:06 AM »
        bill, will you please shut up about sed.
        be gentle, its the new year :) . Using sed is not wrong.  all depends on OP.

        Salmon Trout

        • Guest
        Re: Rename/replace
        « Reply #19 on: December 31, 2009, 10:08:35 AM »
        you're right Ghostdog.

        Bill will you please shut up about sed give us several pages full of stuff about sed, maybe, hopefully including what the OP asked for, but not if you don't want to. It's not like this is a "help" forum, after all.


        BillRichardson



          Intermediate

          Thanked: 15
          Re: Rename/replace
          « Reply #20 on: December 31, 2009, 10:09:35 AM »
          Bill, will you please shut up about sed.

          Who are You?  You are not in charge of anything.

          Sed is without a doubt the best solution.
          Bill Richardson

          Salmon Trout

          • Guest
          Re: Rename/replace
          « Reply #21 on: December 31, 2009, 10:12:06 AM »
          I don't see any renaming going on, bill.

          Helpmeh



            Guru

          • Roar.
          • Thanked: 123
            • Yes
            • Yes
          • Computer: Specs
          • Experience: Familiar
          • OS: Windows 8
          Re: Rename/replace
          « Reply #22 on: December 31, 2009, 11:10:45 AM »
          Ghostdog, there are no instances of multiple underscores, but I would want them replaced by a single space.
          Problem solved. No need to argue about using sed or not. The code already posted without sed works perfectly fine so stop fighting. You (the second-person, multiple, you) are just spamming the forums with USELESS posts!
          Where's MagicSpeed?
          Quote from: 'matt'
          He's playing a game called IRL. Great graphics, *censored* gameplay.

          Salmon Trout

          • Guest
          Re: Rename/replace
          « Reply #23 on: December 31, 2009, 11:14:10 AM »
          I reckon all this kind of stuff probably puts people off coming back. They read their email, see a notification, click the link, read a half baked reply from BillTard, and then go somewhere else. He should be deleted and deleted again every time he comes back.

          BC_Programmer


            Mastermind
          • Typing is no substitute for thinking.
          • Thanked: 1140
            • Yes
            • Yes
            • BC-Programming.com
          • Certifications: List
          • Computer: Specs
          • Experience: Beginner
          • OS: Windows 11
          Re: Rename/replace
          « Reply #24 on: December 31, 2009, 04:17:54 PM »

          Who are You?  You are not in charge of anything.

          HE SAID PLEASE!


          GAWD!

          *storms off*
          I was trying to dereference Null Pointers before it was cool.

          BillRichardson



            Intermediate

            Thanked: 15
            Re: Rename/replace
            « Reply #25 on: December 31, 2009, 04:54:03 PM »
            I don't see any renaming going on, Bill.

            See post #5 in this thread.
            Bill Richardson

            Helpmeh



              Guru

            • Roar.
            • Thanked: 123
              • Yes
              • Yes
            • Computer: Specs
            • Experience: Familiar
            • OS: Windows 8
            Re: Rename/replace
            « Reply #26 on: December 31, 2009, 04:57:14 PM »
            See post #5 in this thread.
            Way to edit your post with more useless code.
            Where's MagicSpeed?
            Quote from: 'matt'
            He's playing a game called IRL. Great graphics, *censored* gameplay.

            BillRichardson



              Intermediate

              Thanked: 15
              Re: Rename/replace
              « Reply #27 on: December 31, 2009, 05:03:23 PM »
              Way to edit your post with more useless code.

              You are right. There is only one solution and Helpmeh provided the code.

              We all learn from Helpmeh.

              Helpmeh can earn a great salary in the computer field if he remains in the computer field.

              Good luck.
              Bill Richardson

              kpac

              • Web moderator


              • Hacker

              • kpac®
              • Thanked: 184
                • Yes
                • Yes
                • Yes
              • Certifications: List
              • Computer: Specs
              • Experience: Expert
              • OS: Windows 7
              Re: Rename/replace
              « Reply #28 on: December 31, 2009, 05:04:33 PM »
              Bill, if I was new to this forum I'd think you were about 5 years old.

              ghostdog74



                Specialist

                Thanked: 27
                Re: Rename/replace
                « Reply #29 on: December 31, 2009, 05:05:02 PM »
                Way to edit your post with more useless code.
                I don't think its useless like you said. let's be fair, first, using sed is not wrong. sed IS and CAN be used to change text/strings. What he is doing is on the right track (although there are obstacles in that track). second, why don't we let OP decide which is the best for himself.
                lastly, let us enjoy the new year and have peace for 1 day. (at least :) )