Any time you have a file, you have two options.
1. Read in line by line and parse out what you do not want (or replace).
With the ASP/COM FSO, the easiest method is to write to another file
location and copy back in.
2. Read in the entire file, as a chunk and replace. Then save on top of the
old file. With large files this may end up being rather clunky.
Better option:
Add a routine that looks up the info you want and have it called from within
the page. When there is no data to show, return an empty string.
--
Gregory A. Beamer
MVP; MCP: +I, SE, SD, DBA
************************************************
Think Outside the Box!
************************************************
"JP SIngh" <no**@none.com> wrote in message
news:Oi**************@TK2MSFTNGP10.phx.gbl...
Can some tell me how can I search for a particular block of text within
the file and delete it?
Section of the file I want to change looks like the one below and I want
all the lines starting with dteHolidays[ deleted?
/* INSERT HOLIDAYS HERE!
*/
dteHolidays[0] = new Date("01/01/2004"); // CHRISTMAS DAY
dteHolidays[1] = new Date("04/09/2004"); // Good Friday
dteHolidays[2] = new Date("04/12/2004"); // Easter Monday
Any help
thanks