473,388 Members | 1,234 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,388 software developers and data experts.

VB6 -> GetAbsolutePathName equivalent method in c#?

Hi There,

I'm trying to convert some VB code into C#.

There is a function defined in VB, GetAbsolutePathName(path) where it
returns the complete path from the root of the drive for the specified
path.
so for ex.: Assume that the current directory is c:\temp\test:

------------------------------------------------------------
<%
dim fs,path
set fs=Server.CreateObject("Scripting.FileSystemObject ")
path=fs.GetAbsolutePathName("c:")
response.write(path)
%>Output:

c:\temp\testExample 2

<%
dim fs,path
set fs=Server.CreateObject("Scripting.FileSystemObject ")
path=fs.GetAbsolutePathName("mydoc.txt")
response.write(path)
%>Output:

c:\temp\test\mydoc.txtExample 3

<%
dim fs,path
set fs=Server.CreateObject("Scripting.FileSystemObject ")
path=fs.GetAbsolutePathName("private\mydoc.txt")
response.write(path)
%>Output:

c:\temp\test\private\mydoc.txt
------------------------------------------------------------

is there an equivalent method in c#?

Thanks!

Sharon

Nov 17 '05 #1
1 4711
>is there an equivalent method in c#?

System.IO.Path.GetFullPath()

Mattias

--
Mattias Sjögren [MVP] mattias @ mvps.org
http://www.msjogren.net/dotnet/ | http://www.dotnetinterop.com
Please reply only to the newsgroup.
Nov 17 '05 #2

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

Similar topics

3
by: Robert Lintner | last post by:
Hi, I woult like to switch from DTD to XML-Schema and am looking for an equivalent to external ENTITY for composition of an xml file from modules --- my.dtd -- <?xml version="1.0"...
4
by: io | last post by:
Hi to everybody.I have a little problem.I usually program with C# but now I must use VB. NET I have a little problem. In C# I used /// to generate comment visible with Intellisense to explain how...
0
by: DavidPfahler | last post by:
I am using the xml documentation(/doc) for c++ and have noticed that the method signatures are not correctly capturing the parameters. I have defined an enumeration in my project as well as other...
17
by: Rasta | last post by:
Hi, I want to create a vb.net procedure that opens a .csv file from a specified directory and then load that file into a SQL server table located on a remote server. Can someone point me towards...
1
by: David Haynes | last post by:
Is there an equivalent method in nuSoap to return the SOAP request as it was sent to the SOAP service? -david-
3
by: wijay2k | last post by:
i'm converting a C# program which parses a XML file into java. in c# the ReadOuterXml() method is used to pullout the whole content of a particular element tag. i need a similar kind of method or...
0
Fary4u
by: Fary4u | last post by:
Hi Guys i'm trying to upload a file, i've tried 3 different methods but still not work out i don't know how to over come this problem hidden file value, multiple form or popup uploading. 1-...
3
by: Bruce Wood | last post by:
Sorry if this is a repost. My original post appears to have disappeared. Is it just me, or is the generic SortedList<Tmissing a GetByIndex method. The old (non-generic) SortedList has a method...
11
by: Wojciech Gryc | last post by:
Hi, I recently started using Python and am extremely happy with how productive it's made me, even as a new user. I'm hoping to continue using the language for my research, and have come across a...
0
by: ryjfgjl | last post by:
If we have dozens or hundreds of excel to import into the database, if we use the excel import function provided by database editors such as navicat, it will be extremely tedious and time-consuming...
0
by: ryjfgjl | last post by:
In our work, we often receive Excel tables with data in the same format. If we want to analyze these data, it can be difficult to analyze them because the data is spread across multiple Excel files...
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
0
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
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
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
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...

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.