473,569 Members | 2,783 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:\$\TestA pp".
there is a test.xml file under "C:\$\TestApp\t est.xml"
I made a virtural directory in IIS as "TestApp"

currently in application, "Request.MapPat h( string)" is used to get the full
filepath.
the result is like @"c:\inetpub\ww wroot\TestApp\t est.xml"
but the real path is @"c:$\TestApp\t est.xml".

What should I use to get the real path?

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

currently in application, "Request.MapPat h( string)" is used to get the
full filepath.
the result is like @"c:\inetpub\ww wroot\TestApp\t est.xml"
but the real path is @"c:$\TestApp\t est.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.nosp amwrote in message
news:%2******** **********@TK2M SFTNGP03.phx.gb l...
Server.MapPath( relativePath)
"Ken" <kl**@jeromegro up.comwrote in message
news:et******** ******@TK2MSFTN GP05.phx.gbl...
>>I have application files under "C:\$\TestA pp".
there is a test.xml file under "C:\$\TestApp\t est.xml"
I made a virtural directory in IIS as "TestApp"

currently in application, "Request.MapPat h( string)" is used to get the
full filepath.
the result is like @"c:\inetpub\ww wroot\TestApp\t est.xml"
but the real path is @"c:$\TestApp\t est.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**@jeromegro up.comschreef in bericht
news:%2******** ********@TK2MSF TNGP03.phx.gbl. ..
the result is same as Request.MapPath (relativePath)

"Scott M." <s-***@nospam.nosp amwrote in message
news:%2******** **********@TK2M SFTNGP03.phx.gb l...
>Server.MapPath (relativePath)
"Ken" <kl**@jeromegro up.comwrote in message
news:et******* *******@TK2MSFT NGP05.phx.gbl.. .
>>>I have application files under "C:\$\TestA pp".
there is a test.xml file under "C:\$\TestApp\t est.xml"
I made a virtural directory in IIS as "TestApp"

currently in application, "Request.MapPat h( string)" is used to get the
full filepath.
the result is like @"c:\inetpub\ww wroot\TestApp\t est.xml"
but the real path is @"c:$\TestApp\t est.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
12367
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 part and a extension part. For example: '/Users/t/web/perl-python/I_Love_You.html' becomes
15
11529
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 MSACCESS.EXE, tries them all, takes the first one it finds, and dies if none is found. Seems to me like at some time or another I was able to clone this...
3
2995
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, _ Optional varTitleForDialog As Variant) As Variant ' Here's an example that gets an Access database name. Dim strFilter As String Dim lngFlags...
2
5245
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 in the text box of File control. But in the code behind when I try to get the FullFile path using file1.PostedFile.FilePath it is not giving the...
3
7152
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 passing the value to a hidden control but all it does is passes only the File Name and not the file path. How do I go about it. I tried checking...
4
4057
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 class library. How can I do this so I wont have to hardcode this path in my getpath() method. Here is the path below. ...
5
4212
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 = document.frm.file.value if(Text.indexOf(":\\") == 1)
11
8259
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 the executed program. so if i write anywhere:
4
2823
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 program works correctly when calling it like this : ./program file1 file2, and also with full paths, like this : ./program c:\dir\file1 c:\dir\file2 ...
65
5036
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 got errors of Failed to open file ./outdir/mytestout.txt. Below is the code: #include <stdio.h>
0
7703
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, people are often confused as to whether an ONU can Work As a Router. In this blog post, we’ll explore What is ONU, What Is Router, ONU & Router’s main...
0
8139
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 tapestry of website design and digital marketing. It's not merely about having a website; it's about crafting an immersive digital experience that...
1
7682
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 Update option using the Control Panel or Settings app; it automatically checks for updates and installs any it finds, whether you like it or not. For...
0
7984
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 protocol has its own unique characteristics and advantages, but as a user who is planning to build a smart home system, I am a bit confused by the...
1
5515
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome a new presenter, Adolph Dupré who will be discussing some powerful techniques for using class modules. He will explain when you may want to use classes...
0
3663
by: TSSRALBI | last post by:
Hello I'm a network technician in training and I need your help. I am currently learning how to create and manage the different types of VPNs and I have a question about LAN-to-LAN VPNs. The last exercise I practiced was to create a LAN-to-LAN VPN between two Pfsense firewalls, by using IPSEC protocols. I succeeded, with both firewalls in...
0
3655
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
1
1230
muto222
by: muto222 | last post by:
How can i add a mobile payment intergratation into php mysql website.
0
954
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 can significantly impact your brand's success. BSMN Consultancy, a leader in Website Development in Toronto offers valuable insights into creating...

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.