473,670 Members | 2,499 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

VB6 -> GetAbsolutePath Name equivalent method in c#?

Hi There,

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

There is a function defined in VB, GetAbsolutePath Name(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.Creat eObject("Script ing.FileSystemO bject")
path=fs.GetAbso lutePathName("c :")
response.write( path)
%>Output:

c:\temp\testExa mple 2

<%
dim fs,path
set fs=Server.Creat eObject("Script ing.FileSystemO bject")
path=fs.GetAbso lutePathName("m ydoc.txt")
response.write( path)
%>Output:

c:\temp\test\my doc.txtExample 3

<%
dim fs,path
set fs=Server.Creat eObject("Script ing.FileSystemO bject")
path=fs.GetAbso lutePathName("p rivate\mydoc.tx t")
response.write( path)
%>Output:

c:\temp\test\pr ivate\mydoc.txt
------------------------------------------------------------

is there an equivalent method in c#?

Thanks!

Sharon

Nov 17 '05 #1
1 4732
>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
3326
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" encoding="ISO-8859-1"?> <!ENTITY module1 SYSTEM "module1.xml"> <!ENTITY module2 SYSTEM "module2.xml"> .....
4
1323
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 to use a function. Is there any equivalent method to do the same in VB .NET? Thanks to everybody
0
825
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 classes. Anytime I use one of these non-native types in a signature it lists <unknown type> in the xml file. This scenario does not happen in all cases, so I am wondering if anyone knows what could cause this problem. Maybe the fact that I am using...
17
1490
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 a code sample that does this? Can I set this up to run at a specified time on windows 2000 server, and how do I do this. I"m familiar with task schedular in XP but don't know what the equivalent of this is in 2000 server. Thanks!
1
5512
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
2102
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 property in java that could fetch all contents within a element tag.
0
1849
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- <SCRIPT TYPE="text/javascript"> function popupform(myform, windowname)
3
439
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 that, given an index into the sorted list, will return the value of the item at that index. The new SortedList<Thas methods to get the index into the list of a value, and another methdo to get the index into the list of a key
11
9399
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 bit of a stumbling block. I'm a seasoned Java programmer and quite a big fan of interfaces... i.e. The idea that if I make a number of distinct classes that implement interface X, I can pass them all as parameters to functions
0
8468
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 usage, and What is the difference between ONU and Router. Let’s take a closer look ! Part I. Meaning of...
0
8386
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 effortlessly switch the default language on Windows 10 without reinstalling. I'll walk you through it. First, let's disable language synchronization. With a Microsoft account, language settings sync across devices. To prevent any complications,...
0
8814
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 captivates audiences and drives business growth. The Art of Business Website Design Your website is...
0
8660
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 choice of these technologies. I'm particularly interested in Zigbee because I've heard it does some...
0
7415
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing, and deployment—without human intervention. Imagine an AI that can take a project description, break it down, write the code, debug it, and then launch it, all on its own.... Now, this would greatly impact the work of software developers. The idea...
0
4390
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
1
2799
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 we have to send another system
2
2041
muto222
by: muto222 | last post by:
How can i add a mobile payment intergratation into php mysql website.
2
1792
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 effective websites that not only look great but also perform exceptionally well. In this comprehensive...

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.