473,503 Members | 2,157 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

Search and replace a code in asp files

46 New Member
All,

I want to be able to replace a piece of code on all the asp files in the root directory with another piece of code.

I use Visual Studio as my Editor to work on asp files...

please guide me if any one has done this in the past.

-T
Jun 19 '07 #1
1 1243
jhardman
3,406 Recognized Expert Specialist
All,

I want to be able to replace a piece of code on all the asp files in the root directory with another piece of code.

I use Visual Studio as my Editor to work on asp files...

please guide me if any one has done this in the past.

-T
Hey Tanya,

I was waiting to see if anyone else would reply to you. I don't know of any method built in to any software that can do what you ask, but I can think of an asp solution.

As you know, asp files are plain text, and any script can open plain text files using scripting.filesystemobject and textstream. The clearest way I can see to do this is open the folder using the fileSystemObject and looping thru the files, opening them one at a time and using the replace method. A script should be able to do this pretty quickly, but you might want to do them one at a time instead. Let me know if you want to pursue this method and want any clarification.

Jared
Jun 20 '07 #2

Sign in to post your reply or Sign up for a free account.

Similar topics

1
8700
by: Les Juby | last post by:
A year or two back I needed a search script to scan thru HTML files on a client site. Usual sorta thing. A quick search turned up a neat script that provided great search results. It was fast,...
1
3281
by: Zenobia | last post by:
Hello I want a search & replace text in source code for several files in several directories. It would seem that both Dreamweaver MX 6 and GoLive 6 offer this feature but not for .aspx file...
5
2617
by: pembed2003 | last post by:
Hi all, I need to write a function to search and replace part of a char* passed in to the function. I came up with the following: char* search_and_replace(char* source,char search,char*...
4
7082
by: Ben Fidge | last post by:
Hi What is the most efficient way to gather a list of files under a given folder recursively with the ability to specify exclusion file masks? For example, say I wanted to get a list of all...
32
14761
by: tshad | last post by:
Can you do a search for more that one string in another string? Something like: someString.IndexOf("something1","something2","something3",0) or would you have to do something like: if...
2
1367
by: Jan | last post by:
Hello! I am looking for a way to do a search&replace in ASCII-Files by a vb.net 2005 programm. Of coarse I can open the files, loop to every line, make a replace, and save the line. But I wonder...
6
2659
by: DataSmash | last post by:
Hello, I need to search and replace 4 words in a text file. Below is my attempt at it, but this code appends a copy of the text file within itself 4 times. Can someone help me out. Thanks! #...
5
2118
by: foolproofplan | last post by:
Hey everyone. I am running into a problem with unique ids that need to be compared in two xml files. The actual object name is represented with its unique id later in the xml file, so i need to do...
1
7511
Merlin1857
by: Merlin1857 | last post by:
How to search multiple fields using ASP A major issue for me when I first started writing in VB Script was constructing the ability to search a table using multiple field input from a form and...
5
6434
by: TC | last post by:
I use Visual Studio 2005 v8.0 on two different computers. On one, the "Find and Replace" dialog gives me the option to look in the "Entire Solution". On the other computer, the "Find and Replace"...
0
7205
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
0
7093
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...
0
7287
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers,...
0
7349
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...
1
7008
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows...
1
5022
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome a new...
0
1521
by: 6302768590 | last post by:
Hai team i want code for transfer the data from one system to another through IP address by using C# our system has to for every 5mins then we have to update the data what the data is updated ...
1
746
muto222
by: muto222 | last post by:
How can i add a mobile payment intergratation into php mysql website.
0
399
bsmnconsultancy
by: bsmnconsultancy | last post by:
In today's digital era, a well-designed website is crucial for businesses looking to succeed. Whether you're a small business owner or a large corporation in Toronto, having a strong online presence...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.