There is more to this code just this seemed like the bit important to what im doing.
I need to get the program to read from the param file and change the string to "XXXXXX"
for (enumtor = new Enumerator(folder.Files) ; !enumtor.atEnd(); enumtor.moveNext())
{
try
{
//Get File
FileOrig=fs.GetFile(enumtor.item().Path);
//If FILE SYSTEM extension equals SQL
if (fs.GetExtensionName(FileOrig).toLowerCase()=="sql "){
//Open Original File
f = FileOrig.OpenAsTextStream(1,0);
//Create tmpFile
var FileName = enumtor.item().Path;
FileTemp = fs.CreateTextFile(FileName+".tmp", true);
while( !f.AtEndOfStream ){
content = f.ReadLine();
while (content.indexOf("_flodsOwner_")>-1){
content = content.replace("_flodsOwner_",param);
}
FileTemp.WriteLine(content);
}
f.Close();
FileTemp.Close();
}
}
catch(e){}
}
any ideas?
Thanks
Edited by ZekeDragon, 23 February 2011 - 09:01 AM.
Please use [CODE] tags (the # button) when posting code.


Sign In
Create Account


Back to top









