Link to home
Start Free TrialLog in
Avatar of 66chawger
66chawgerFlag for United States of America

asked on

Get the drive letter from a path that is already known

I have been successful in retrieving the PhysicalApplicationPath (see code snippet below)
For now, I just did a response.write to see the path.  Now what I want to do is get the drive letter of this path.  This sounds so simple, and I don't want to "over code"  Maybe I can use trim?


Response.Write(Request.PhysicalApplicationPath);

Open in new window

ASKER CERTIFIED SOLUTION
Avatar of tempstf1
tempstf1

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
Avatar of 66chawger

ASKER

Another accurate and quick response!  Thanks!
Have one question....   Having a bit of trouble with the syntax to include my drive letter in my path.... see snippet...Thanks!!

I want to put double quotes around the sAppDrive.... like............. "+sAppDrive+"  but of course syntax gets all crossed up with the rest of the statement.
SafecoService.CreatePDFApplication(@"+sAppDrive+inetpub\wwwroot\data\SafecoCommercialAuto\"+psQuoteID+".pdf",bytes);

Open in new window