G
Guest
Hi i have an application wich have to retrieve information of files. I have
an openfiledialog on which i cans elect a file and then i retrieve the path
to the file selected on it by the user.I create a FileInfo object with that
path
Well when i later try to create a new fileinfo object passing to the
constructor teh relative path of another file it cant find the file because
automatically it puts the path i used before to create another fileinfo
object at the beginning of my path. For example if i create a first File Info
object this way:
FielInfo info=new FileInfo("C:\Program Files\Folder\hello.txt");
when i try to create this second
FileInfo info=new FileInfo("goodbye.txt");
it throws me an exception saying that the file "C:\Prtogram
Files\Folder\goodbye.txt" doesnt exists. (Of course it doesnt exists on that
location because the file goodbye.txt it is suposed to be in the same folder
as the executable of my application)
Can someone tell me what can i do
Many thanbks
an openfiledialog on which i cans elect a file and then i retrieve the path
to the file selected on it by the user.I create a FileInfo object with that
path
Well when i later try to create a new fileinfo object passing to the
constructor teh relative path of another file it cant find the file because
automatically it puts the path i used before to create another fileinfo
object at the beginning of my path. For example if i create a first File Info
object this way:
FielInfo info=new FileInfo("C:\Program Files\Folder\hello.txt");
when i try to create this second
FileInfo info=new FileInfo("goodbye.txt");
it throws me an exception saying that the file "C:\Prtogram
Files\Folder\goodbye.txt" doesnt exists. (Of course it doesnt exists on that
location because the file goodbye.txt it is suposed to be in the same folder
as the executable of my application)
Can someone tell me what can i do
Many thanbks