i am using windows server 2003.

I have a requirement that in a text file, i want to replace any word after keyword tablespace with some other word.

For example, if file contains the following line
create index csadidxqdes_1 on csadidxqdes(gvkeyx, qtr, datadate) tablesapce csxf_indexfundamentals;

then it should replace the word csxf_indexfundamentals with other word passed. Suppose it is basic in this example, then output should be

create index csadidxqdes_1 on csadidxqdes(gvkeyx, qtr, datadate) tablesapce basic;

Can any body please tell me, how can i do this using batch file programming.