Converting 'space' to 'underscore'?

Collapse
X
 
  • Time
  • Show
Clear All
new posts
  • Nat
    Confirmed User
    • Sep 2001
    • 553

    #1

    Converting 'space' to 'underscore'?

    I have a shitload of files with space's in there names, like "my hot page.html" and i am looking for some program that can convert all the spaces to underscore instead, so that the page would be renamed to "my_hot_page.html" instead...

    If anyone know of such a program, please let me know!

    Thanks, and Happy New Year to you all!
  • wwwcashmountain
    Confirmed User
    • Dec 2002
    • 194

    #2
    This is a dead easy task under unix - are you running unix ?

    Robert
    SIG TOO BIG! Maximum 120x60 button and no more than 3 text lines of DEFAULT SIZE and COLOR. Unless your sig is for a GFY top banner sponsor, then you may use a 624x80 instead of a 120x60.

    Comment

    • Nat
      Confirmed User
      • Sep 2001
      • 553

      #3
      Nope, but i have shell access, so thats no problem.. just let me know the commands and i will have it fixed

      Comment

      • Nat
        Confirmed User
        • Sep 2001
        • 553

        #4
        anyone?

        Comment

        • Cohen
          Confirmed User
          • Nov 2002
          • 1099

          #5
          format c: (press "enter" 2 times REALLY fast)
          dont look at this signature, Wildcard told me making money on GFY is baaaaaaaaaddd - so my sponsor links have been removed

          Comment

          • Nat
            Confirmed User
            • Sep 2001
            • 553

            #6
            Originally posted by Cohen
            format c: (press "enter" 2 times REALLY fast)
            Thanks a lot for that post, real helpful!

            Comment

            • Cohen
              Confirmed User
              • Nov 2002
              • 1099

              #7
              Originally posted by Nat


              Thanks a lot for that post, real helpful!
              Anytime man - thats what im there 4
              dont look at this signature, Wildcard told me making money on GFY is baaaaaaaaaddd - so my sponsor links have been removed

              Comment

              • Nat
                Confirmed User
                • Sep 2001
                • 553

                #8
                Originally posted by Cohen


                format c: (press "enter" 2 times REALLY fast)
                Did you come up with that line all by yourself? wow, you must be proud!
                Last edited by Nat; 01-01-2003, 06:04 PM.

                Comment

                • Cohen
                  Confirmed User
                  • Nov 2002
                  • 1099

                  #9
                  Originally posted by Nat


                  Did you come up with that line all by yourself? wow, you must be proud!
                  what ? I just replyed to his remark..
                  What the hell is your problem?
                  dont look at this signature, Wildcard told me making money on GFY is baaaaaaaaaddd - so my sponsor links have been removed

                  Comment

                  • extreme
                    Confirmed User
                    • Oct 2002
                    • 2120

                    #10
                    Code:
                    perl -e {'@a=`ls *.html`; foreach $o (@a) { chop($o); $n=$o; $n=~s/ /_/g; $s = "mv \"$o\" \"$n\"\n"; system($s); };'};
                    ... yay for perl.

                    Comment

                    • Cohen
                      Confirmed User
                      • Nov 2002
                      • 1099

                      #11
                      Originally posted by extreme
                      Code:
                      perl -e {'@a=`ls *.html`; foreach $o (@a) { chop($o); $n=$o; $n=~s/ /_/g; $s = "mv \"$o\" \"$n\"\n"; system($s); };'};
                      ... yay for perl.
                      I dont know SHIT about linux, but would just like to know, can you execute perl direct from the prompt?
                      dont look at this signature, Wildcard told me making money on GFY is baaaaaaaaaddd - so my sponsor links have been removed

                      Comment

                      • Nat
                        Confirmed User
                        • Sep 2001
                        • 553

                        #12
                        Originally posted by extreme
                        Code:
                        perl -e {'@a=`ls *.html`; foreach $o (@a) { chop($o); $n=$o; $n=~s/ /_/g; $s = "mv \"$o\" \"$n\"\n"; system($s); };'};
                        ... yay for perl.
                        Great! thanks a lot man!!

                        Comment

                        • extreme
                          Confirmed User
                          • Oct 2002
                          • 2120

                          #13
                          Originally posted by Cohen


                          I dont know SHIT about linux, but would just like to know, can you execute perl direct from the prompt?
                          yes, that very line was intended for execution directly from the prompt.


                          unixprompt$ perl -e {'PERL CODE GOES HERE'}

                          Comment

                          • magnatique
                            Confirmed User
                            • Jan 2001
                            • 1830

                            #14
                            let me know if you got it... otherwize, I got one that`ll do that windows based...

                            icq: 421704

                            Stunner Media Programs: StandAhead | IndieBucks | BoyCrushCash | Phoenixxx | EmoProfits | BritishBucks | HunkMoney | LatinoBucks
                            Make $$$ with Gay! Lowest Minimum Payouts in the Business, Perfect Track Record, Amazing Sites

                            Comment

                            Working...