If you have a specific number of files, I'd seriously
consider adding them as embedded resources. To do this,
go to VS.nET and Add Existing ITem and point to the
file. This will add it in comiled form to your project.
Just make sure you set it's build property to Embedded
Resource. If you do this, it will always exist.
I'm not sure about the other part though. Why would it
exist on some machines and not others? Will it/SHould it
always exist locally or are you going to reference a
network share for instance. You can't hit a specific
device name with either FileInfo or Path classes, but I
think the path class may get what you want ..although if
you could show me a in depth example I'm sure we can
figure it out.
http://msdn.microsoft.com/library/default.asp?
url=/library/en-
us/cpref/html/frlrfsystemiopathclasstopic.asp
Let me know.
Bill
-----Original Message-----
Hello Everyone and thanks for your help in advance. I
amworking on an application that uses as helper class to
determine if an image file exists. If the file exists,
the path to the image is returned. Otherwise,
a "Picturenot found" path is returned. I have that part workin
well. However, I have developed this on a local machine
and want to push the class to my prosuction server.
However, the paths change from machine to machine. I
want to be able to find the fully qualified path to a
particular file or directory. I tried File.GetFullPath
(myFilename), but that returns C:\WINDOWS\system32
\myFilename which is not where the file resides. I want
to make this as dynamic as possible. Any help would be
greatly appreciated. Thanks.
.