Old 17th September 2002, 02:37   #1
KiwiFreak
Major Dude
 
KiwiFreak's Avatar
 
Join Date: Oct 2001
Location: New Zealand
Posts: 505
Does anyone know how to create a batch file

Hi all, I need to create a Batch File to open up htm pages in notepad, then add some code and save it again, I've got around 270 pages that I need to add the code for disabling the right click button and I don't want to have to change each page manually.

Please Help

If you think you can or think you can't...you're right.
KiwiFreak is offline   Reply With Quote
Old 17th September 2002, 02:45   #2
Some1
Forum King
 
Join Date: Apr 2000
Location: 14th Street Posts: (-1)^�
Posts: 2,236
I'm not good enough with batch files to write one that would do that, but it would be fairly simple to write a c++ app to do essentially the same thing...
Some1 is offline   Reply With Quote
Old 17th September 2002, 02:48   #3
KiwiFreak
Major Dude
 
KiwiFreak's Avatar
 
Join Date: Oct 2001
Location: New Zealand
Posts: 505
Damb, I knew I shold have learnt c++

If you think you can or think you can't...you're right.
KiwiFreak is offline   Reply With Quote
Old 17th September 2002, 02:54   #4
tiger84
Major Dude
 
Join Date: Feb 2001
Location: 101010
Posts: 750
Batch files aren't hard to write at all. Just put in a list of commands in a text file and call it anything.bat. Use autoexec.bat as a guide. Batch files (DOS ones anyway) only work with a DOS based Windows platform

If life calls and you're busy, let the answering machine pick-up.

Just so you know, my previous avatar was NOT a swastika, nor did it have much similarity to one. Just thought I'd clear that up since I cannot use my own original art work.
tiger84 is offline   Reply With Quote
Old 17th September 2002, 02:58   #5
prodangle
Major Dude
 
prodangle's Avatar
 
Join Date: Nov 2000
Location: Scotland
Posts: 718
It could also be done with nsis
prodangle is offline   Reply With Quote
Old 17th September 2002, 02:58   #6
Some1
Forum King
 
Join Date: Apr 2000
Location: 14th Street Posts: (-1)^�
Posts: 2,236
If you'd like (and if nobody knows how to do it with a batch file) I could code the app for you and then email it over or something...the entire process shouldn't take me more than an hour or so, depending on how nice I want to make the interface and how fancy I decide to get with things like memory allocation and such...now would be a good time to make suggestions about how you'd like the interface and other functions to work (it'll be command line based)...right now the way I see it is that the app will query you for the name of the file that contains the code to append to the HTML files, and then prompt for the name of a HTML file, append the code, prompt for the next HTML file, and so on. Also, if you want the code inserted into a certain place in the file (beginning, middle, end, after a certain HTML tag, etc.) now would be a good time to say so, since I have a 3 hour long CSCI course to go to soon and I won't get started on this little project until after I get back.
Some1 is offline   Reply With Quote
Old 17th September 2002, 03:03   #7
rm'
Banned
 
rm''s Avatar
 
Join Date: Jul 2000
Posts: 11,361
Quote:
Originally posted by tiger84
Batch files (DOS ones anyway) only work with a DOS based Windows platform
Batch files can be run on NT based operating systems. Using the batch scripting language by itself, you cannot do what you are wanting. Batch files simply perform Windows (DOS) operations such as executing a file, deleting a directory, and so and so forth. There is no DOS operation that inserts text into a file, and that's why it can't be done. What you can do, however, is to automate the operation of an application that will insert text into a file. Find something somewhere on the net (I've seen them around so I know they exist) that will insert text into a file. Then, write a batch file to execute this program, perform the operation on the html file, repeat for each successive html file.
rm' is offline   Reply With Quote
Old 17th September 2002, 03:25   #8
Curi0us_George
Forum King
 
Curi0us_George's Avatar
 
Join Date: Apr 2001
Location: Oxford, MS Posts: -1
Posts: 5,179
Send a message via AIM to Curi0us_George Send a message via Yahoo to Curi0us_George
A better idea would be to not disable the right mouse button. A lot of people use it for browsing, and interfering with it will piss a lot of people off.

I never ever return to a site that interferes with my right mouse button.

(On top of that, it doesn't stop people from stealing your graphics or anything else.)

For the freedom to express myself in my own way without fear of being censored or banned.

47 65 6C 61 65 64 2E 63 6F 6D 00
Curi0us_George is offline   Reply With Quote
Old 17th September 2002, 03:50   #9
zootm
Forum King
 
zootm's Avatar
 
Join Date: Jan 2002
Location: the nether reaches of bonnie scotland
Posts: 13,375
Quote:
Originally posted by Curi0us_George
A better idea would be to not disable the right mouse button. A lot of people use it for browsing, and interfering with it will piss a lot of people off.
yeah, i have to admit it pisses me right off.

zootm is offline   Reply With Quote
Reply
Go Back   Winamp & Shoutcast Forums > Community Center > General Discussions

Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump