Wrox Programmer Forums
VB.NET 2002/2003 Basics For coders who are new to Visual Basic, working in .NET versions 2002 or 2003 (1.0 and 1.1).
Welcome to the p2p.wrox.com Forums.

You are currently viewing the VB.NET 2002/2003 Basics section of the Wrox Programmer to Programmer discussions. This is a community of software programmers and website developers including Wrox book authors and readers. New member registration was closed in 2019. New posts were shut off and the site was archived into this static format as of October 1, 2020. If you require technical support for a Wrox book please contact http://hub.wiley.com
Old May 4th, 2007, 06:11 AM
Authorized User
Join Date: Jan 2007
Posts: 22
Thanks: 0
Thanked 0 Times in 0 Posts
Default strings

hey guys i have a vb.net application in which he user has to select a file from his machine in order to do some specific work... lets say the path for this file is
C:\Documents and Settings\Administrator\Desktop\Dump\Database1.dump

i want to return

C:\Documents and Settings\Administrator\Desktop\Dump
how can i do that?
thanks in advance

Old May 4th, 2007, 02:55 PM
Friend of Wrox
Join Date: Nov 2004
Posts: 1,621
Thanks: 1
Thanked 3 Times in 3 Posts

If the user is selecting the file, making it so that you get the fully-qualified file-locating string, you can search from the right to find the 1st “\” and return all up to that.

There are controls that let you select a folder graphically, so there would be no file part.

You can use the file-system functionality and open the file as an object, and get that object's path property.

You could restrict your users to just the root folder . . . (Kidding . . .)

Similar Threads
Thread Thread Starter Forum Replies Last Post
strings bschleusner C# 2005 3 February 27th, 2007 11:46 PM
Strings ldoodle Classic ASP Basics 0 June 28th, 2005 09:26 AM
strings Moharo Pro PHP 2 May 17th, 2004 06:15 AM
strings... slowhand BOOK: ASP.NET Website Programming Problem-Design-Solution 1 January 5th, 2004 06:27 AM
strings slowhand SQL Server 2000 1 January 5th, 2004 12:20 AM

Powered by vBulletin®
Copyright ©2000 - 2020, Jelsoft Enterprises Ltd.
Copyright (c) 2020 John Wiley & Sons, Inc.