473,511 Members | 14,975 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

get the full file path

Ken
I have application files under "C:\$\TestApp".
there is a test.xml file under "C:\$\TestApp\test.xml"
I made a virtural directory in IIS as "TestApp"

currently in application, "Request.MapPath( string)" is used to get the full
filepath.
the result is like @"c:\inetpub\wwwroot\TestApp\test.xml"
but the real path is @"c:$\TestApp\test.xml".

What should I use to get the real path?

Thanks
Jun 1 '07 #1
3 2811
Server.MapPath(relativePath)
"Ken" <kl**@jeromegroup.comwrote in message
news:et**************@TK2MSFTNGP05.phx.gbl...
>I have application files under "C:\$\TestApp".
there is a test.xml file under "C:\$\TestApp\test.xml"
I made a virtural directory in IIS as "TestApp"

currently in application, "Request.MapPath( string)" is used to get the
full filepath.
the result is like @"c:\inetpub\wwwroot\TestApp\test.xml"
but the real path is @"c:$\TestApp\test.xml".

What should I use to get the real path?

Thanks


Jun 1 '07 #2
Ken
the result is same as Request.MapPath(relativePath)

"Scott M." <s-***@nospam.nospamwrote in message
news:%2******************@TK2MSFTNGP03.phx.gbl...
Server.MapPath(relativePath)
"Ken" <kl**@jeromegroup.comwrote in message
news:et**************@TK2MSFTNGP05.phx.gbl...
>>I have application files under "C:\$\TestApp".
there is a test.xml file under "C:\$\TestApp\test.xml"
I made a virtural directory in IIS as "TestApp"

currently in application, "Request.MapPath( string)" is used to get the
full filepath.
the result is like @"c:\inetpub\wwwroot\TestApp\test.xml"
but the real path is @"c:$\TestApp\test.xml".

What should I use to get the real path?

Thanks



Jun 1 '07 #3
Ken,

Have a look at the path class
http://msdn2.microsoft.com/en-us/lib...m.io.path.aspx

Cor
"Ken" <kl**@jeromegroup.comschreef in bericht
news:%2****************@TK2MSFTNGP03.phx.gbl...
the result is same as Request.MapPath(relativePath)

"Scott M." <s-***@nospam.nospamwrote in message
news:%2******************@TK2MSFTNGP03.phx.gbl...
>Server.MapPath(relativePath)
"Ken" <kl**@jeromegroup.comwrote in message
news:et**************@TK2MSFTNGP05.phx.gbl...
>>>I have application files under "C:\$\TestApp".
there is a test.xml file under "C:\$\TestApp\test.xml"
I made a virtural directory in IIS as "TestApp"

currently in application, "Request.MapPath( string)" is used to get the
full filepath.
the result is like @"c:\inetpub\wwwroot\TestApp\test.xml"
but the real path is @"c:$\TestApp\test.xml".

What should I use to get the real path?

Thanks




Jun 2 '07 #4

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

3
12364
by: Xah Lee | last post by:
Split File Fullpath Into Parts Xah Lee, 20051016 Often, we are given a file fullpath and we need to split it into the directory name and file name. The file name is often split into a core...
15
11516
by: (Pete Cresswell) | last post by:
I've got a .BAT file that I use for executing various MS Access apps that I wrote way back in the days of 2.0. It's evolved over time, but it still contains a number of possible paths to...
3
2981
by: Wayne Aprato | last post by:
I am using code kindly provided by the Access Web to capture a file path and insert it into a form. The relevant part of the code follows: Function GetOpenFile(Optional varDirectory As Variant,...
2
5238
by: Sridhar | last post by:
Hi, I have a web form where it has a <input type=file id=file1> control. I have an Upload button to upload the file. WHen I click on browse and select one file, it is showing the full file path...
3
7144
by: Vibhu | last post by:
Hello All, I have a input box on the HTML page with the type set to file. What I want is that when the value changes in the file textbox, it should give me the full file path. I have even tried...
4
4047
by: Dots | last post by:
I have a class library with a method called getpath(). I want to be able to get the full path of a folder and write some files to the (my_files_dir) folder. A console application will use this...
5
4210
by: Smarty | last post by:
Dear Friends, I did a file type validation in Javascript. Just i want to check whether a selected file is BMP or JPG. I wrote the following function for it. function checkType(){ Text =...
11
8249
by: rh00667 | last post by:
hi all, i'm confused now. how i can get the full path of an application? if myapp is in a directory which belongs to PATH, argv gives me the first token of cmd line, and not the real path of...
4
2819
by: Michel Rouzic | last post by:
I made a program that accepts as parameters an input file name that we'll call file1, and an output file name that we'll call file2, and opens on its own a configuration file called file3. My...
65
5021
by: Hongyu | last post by:
Dear all: I am trying to write to a file with full directory name and file name specified (./outdir/mytestout.txt where . is the current directory) in C programming language and under Unix, but...
0
7252
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
0
7153
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...
0
7371
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers,...
0
7432
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...
1
7093
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows...
0
7517
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each...
0
3218
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
0
1583
by: 6302768590 | last post by:
Hai team i want code for transfer the data from one system to another through IP address by using C# our system has to for every 5mins then we have to update the data what the data is updated ...
0
452
bsmnconsultancy
by: bsmnconsultancy | last post by:
In today's digital era, a well-designed website is crucial for businesses looking to succeed. Whether you're a small business owner or a large corporation in Toronto, having a strong online presence...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.