the error obtained is like the following
"the Entry path name is not legal"
What does it mean & canu explain this problem & find a solution for the reading of document file like doc,docx etc using C# language
Loading
Know the answer? Post it — somebody with the same question will find it here.
Sign in to answer this question
It is the same account you read, post and publish with — and you will come straight back to this page.
FroglegPosted Feb 17, 2012, 1:19 AM
should be
StreamReader objreader = new StreamReader(path);
Path.GetExtension will get a file extension - ie:
Path.GetExtension("test.txt");
will return ".txt"
Suthish NairPosted Feb 19, 2012, 2:38 PM
Aditya Varma MudunuriPosted Feb 17, 2012, 3:50 AM
Pramod Kumar NandagiriPosted Feb 17, 2012, 3:30 AM
string path = @"C:\SUBS\Employee\156 Useful Run Commands";
what is "156 Useful Run Commands", if this is a file name then it's extension must have to be provided.
ex: string path = @"C:\SUBS\Employee\156 Useful Run Commands.txt";
(or)
string path = @"C:\SUBS\Employee\156 Useful Run Commands.docx";
Provide extension in the path and change "Path.GetExtension(path)" to "Path" as said by "Mr Frogleg "
StreamReader objreader = new StreamReader(Path);
then u will get no error
Aditya Varma MudunuriPosted Feb 17, 2012, 2:04 AM
Please Provide me a solution for this issue