my code like as
private void btnOnlineSubmit_Click(object sender, EventArgs e)
{
string dpath = @"E:\ClusterGroups";
DirectoryInfo d1 = new DirectoryInfo(dpath);
DirectoryInfo[] d2 = d1.GetDirectories("*.*");
foreach (DirectoryInfo d3 in d2)
{
filecnt = d2.Length;
string DeleteFPath = "";
FileInfo[] filenames = d3.GetFiles("*.*");
for (int i = 0; i <= filenames.Length - 1; i++)
{
Fileinfo f1 = new Fileinfo();
Fileinfo f2 = new Fileinfo();
f1.Ffullname = filenames[i].FullName;
f1.Fextension = filenames[i].Extension;
string fs = "";
string fs1 = "";
if (filenames[i].Extension == ".pdf" && FExtension == ".pdf")
{
fs = ExtractTextFromPdf(f1.Ffullname);
fs1 = Extract(OPath);
}
else if (filenames[i].Extension == ".txt" && FExtension == ".txt")
{
<pre lang="c#"> fs = File.ReadAllText(f1.Ffullname);
fs1 = File.ReadAllText(OPath);
}
else if (filenames[i].Extension == ".docx" && FExtension == ".docx")
{
TextExtractor extractor = new TextExtractor(f1.Ffullname);
TextExtractor extractor1 = new TextExtractor(OPath);
fs = extractor.ExtractText();
fs1 = extractor1.ExtractText();
}
in this above code first problem is reads the data from text file
fs = File.ReadAllText(f1.Ffullname);
this above statment not read the content from text file.this statement read the
datetime only.i had found by break points.
fs string read datetime.this can be found by breakpoint only
please slove the probelm
another problem is raise error like as
"cannot find central directory"
this error raise at
fs = extractor.ExtractText();
if u want to read the data from .docx file use the namespace i.e
using Code7248.word_reader;
in this textextrator added in library.
please help me.