Thanks for the reply.
This is getting designed for a hosted site, so how do you
reference that path to the ROOT of your hosted space? I thought that ~ did
that for you, or it has for me for years.
Line 1 i declare the path two folders below where I am
working. Line 2 gets that path.
string
file =@"~/Bulletin/"+FilePath+"/"+FileName; FileInfo fi=new FileInfo(file);Is
there another method other then FileInfo to use at this
point?
I
can't seem to get Request.MapPath which is probably my
failure.
Stephen Russell
S.R. & Associates
Memphis, TN
38115
901.246-0159
http://spaces.msn.com/members/srussell/
From: Rizwan Ahmed [mailto:[EMAIL PROTECTED]
Sent: Friday, July 29, 2005 7:28 AM
To: [email protected]
Subject: Re: [Microsofts_C_Sharp] Where did I get lost?
Hey Chris,
FileInfo would require to give full file path.
that is C:\...\FileName.ext
hope this hellps.
Regards,
Rizwan Ahmed
Chris Cottrell <[EMAIL PROTECTED]> wrote:
Chris Cottrell <[EMAIL PROTECTED]> wrote:
I think it is probably erroring out after the FileInfo constructor if file is not a full path. I don't think it uses the current directory.Chris
On 7/28/05, Stephen Russell <[EMAIL PROTECTED]> wrote:
Have a filestream off of my dev-box in a WebService that doesn't see where I
think it should. My dir is off of InetPub\wwwroot\MyDir.
FileInfo fi=new FileInfo(file); shows theDirectory name below
DirectoryName @"C:\WINDOWS\system32\~\Bulletin\Advertising"
File I pass in "~/Bulletin/Advertising/HY25-2452-M1_US.pdf"
Where is this going wrong? This is the next set of code, and .Exists never
hits.
if (fi.Exists)
{
string ex1="";
}
FileStream fs=fi.OpenRead();
TIA
Stephen Russell
S.R. & Associates
Memphis, TN 38115
901.246-0159
http://spaces.msn.com/members/srussell/
Yahoo! Groups Links
<*> To visit your group on the web, go to:
http://groups.yahoo.com/group/Microsofts_C_Sharp/
<*> To unsubscribe from this group, send an email to:
[EMAIL PROTECTED]
<*> Your use of Yahoo! Groups is subject to:
http://docs.yahoo.com/info/terms/
Rizwan Ahmed
__________________________________________________
Do You Yahoo!?
Tired
of spam? Yahoo! Mail has the best spam protection around
http://mail.yahoo.com
YAHOO! GROUPS LINKS
- Visit your group "Microsofts_C_Sharp" on the web.
- To unsubscribe from this group, send an email to:
[EMAIL PROTECTED]
- Your use of Yahoo! Groups is subject to the Yahoo! Terms of Service.
