How to mass delete javascript file from hundreds of pages?

Collapse
X
 
  • Time
  • Show
Clear All
new posts
  • teomaxxx
    Confirmed User
    • May 2003
    • 2737

    #1

    How to mass delete javascript file from hundreds of pages?

    I have to delete javascript code (around 8 lines of code) from hundreds of html pages. Any ideas how to do that quickly without hand ?
  • Andiz
    Confirmed User
    • Feb 2006
    • 2594

    #2
    Search and replace.

    I bet you can find a fancy program online for that

    Comment

    • KimJI
      Confirmed User
      • May 2007
      • 1839

      #3
      if you have dreamweaverMX, you can do a "find and replace" on a whole folder, local site or remote site.

      so if its the same code, it should take you only a few mins to start
      Trafficadept | Best traffic I have ever tested | web "@t" cuul.org

      Comment

      • teomaxxx
        Confirmed User
        • May 2003
        • 2737

        #4
        Originally posted by Andiz
        Search and replace.

        I bet you can find a fancy program online for that
        yes, it had to be some fancy program, since every other program can replace only one line and my javascripts is different in almost every second page , I would rather quickly delete all javascript codes by one click.
        i have searched for it, but it seems to me that most easiest way is to go custom.

        Comment

        • fris
          I have to go potty
          • Aug 2002
          • 55789

          #5
          prob some awk/sed/regex ninja type stuff
          Since 1999: 69 Adult Industry awards for Best Hosting Company and professional excellence.


          My Newest Theme

          Comment

          • KimJI
            Confirmed User
            • May 2007
            • 1839

            #6
            Originally posted by teomaxxx
            yes, it had to be some fancy program, since every other program can replace only one line and my javascripts is different in almost every second page , I would rather quickly delete all javascript codes by one click.
            i have searched for it, but it seems to me that most easiest way is to go custom.

            look at my reply damm it. dreamweaverMX can do it and you can download a 30trial if you dont already have it
            Trafficadept | Best traffic I have ever tested | web "@t" cuul.org

            Comment

            • DamageX
              Marketing & Strategy
              • Jun 2001
              • 14293

              #7
              rm -Rf *
              Whitehat is for chumps

              If you don't do it, somebody else will - true story!

              Comment

              • testpie
                Mostly retired
                • Apr 2006
                • 3231

                #8
                Originally posted by DamageX
                rm -Rf *

                Affiliates: DogFart ~ Domain parking: NameDrive ~ Traffic broker: Traffic Holder

                Comment

                • psili
                  Confirmed User
                  • Apr 2003
                  • 5526

                  #9
                  Originally posted by Fris
                  prob some awk/sed/regex ninja type stuff
                  Yea, about as far as I wanted to play was cd'ing into a directory and running:

                  ls -f | awk '/.html/ {print "cat " $1}'|sh

                  I'm sure there's a way to pipe that into a string, reg-out what you don't want and pipe it back into the file. Then again, I remember there being some nifty perl command line thing for it as well... thus I'm no help, but here's a bump for you.
                  Your post count means nothing.

                  Comment

                  • Mr Pheer
                    So Fucking Banned
                    • Dec 2002
                    • 22082

                    #10
                    Originally posted by DamageX
                    rm -Rf *
                    you son of a bitch... how do i fix this?

                    Comment

                    • Masterchief
                      Confirmed User
                      • Jun 2006
                      • 530

                      #11
                      get editplus, open all files and run an regex search and replace

                      Comment

                      • DamageX
                        Marketing & Strategy
                        • Jun 2001
                        • 14293

                        #12
                        Originally posted by Mr Pheer
                        you son of a bitch... how do i fix this?
                        Whitehat is for chumps

                        If you don't do it, somebody else will - true story!

                        Comment

                        • psili
                          Confirmed User
                          • Apr 2003
                          • 5526

                          #13
                          Originally posted by Mr Pheer
                          you son of a bitch... how do i fix this?
                          pressing "ctrl -z" doesn't work?

                          -----
                          Here's that perl thing:

                          http://kb.iu.edu/data/afrk.html

                          perl -pi -e 's/<script.*?</script>/blahblah/g' *.html
                          or some shit like that.

                          Otherwise, get a decent IDE like all other suggestions and follow their advice.
                          Your post count means nothing.

                          Comment

                          • u-Bob
                            there's no $$$ in porn
                            • Jul 2005
                            • 33063

                            #14
                            perl is your friend.

                            Comment

                            • BucksMania
                              Confirmed User
                              • Oct 2005
                              • 3758

                              #15
                              if the java script is different you will need some kind of script or proggie supporting reg expressions

                              Comment

                              • SmokeyTheBear
                                ►SouthOfHeaven
                                • Jun 2004
                                • 28609

                                #16
                                i have a php program you could use to do this, ill see if i can find it
                                hatisblack at yahoo.com

                                Comment

                                • Vick!
                                  Confirmed User
                                  • Nov 2005
                                  • 6882

                                  #17
                                  del *.*

                                  ______
                                  Affordable Quality Web Hosting

                                  Comment

                                  • munki
                                    Do Fun Shit.
                                    • Dec 2004
                                    • 13393

                                    #18
                                    Originally posted by Mr Pheer
                                    you son of a bitch... how do i fix this?



                                    I have the simplest tastes. I am always satisfied with the best.” -Oscar Wilde

                                    Comment

                                    • pornmasta
                                      Too lazy to set a custom title
                                      • Jun 2006
                                      • 19827

                                      #19
                                      put all your files if the same directory then code a software that list every files of the directory, then code that for each file the source code is stored in a memory stream, find and delete what is not good, then write over the old file with the memory stream.
                                      In delphi i can code that in 1 hour.

                                      Comment

                                      • tranza
                                        ICQ: 197-556-237
                                        • Jun 2003
                                        • 57559

                                        #20
                                        Originally posted by Mr Pheer
                                        you son of a bitch... how do i fix this?

                                        Lololololol.... Are you for real??
                                        I'm just a newbie.

                                        Comment

                                        Working...