473,395 Members | 1,468 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,395 software developers and data experts.

Help regarding new folder creation.

Hi all
I am having one application where i want to implement new feature that
is 'create new folder'. and display new folder name in listview.
My listview is editable.
My problem is i want to display unique folder name to the user at a
time of creating new folder.
That is if user click on 'create new folder' by default i am displaying
text as 'New folder'.
But i want this functionality to be same as that of windows explorer.

Does any one is having any idea about it.
Please help me.
Thanks in advance.

Nov 21 '05 #1
1 1218
There are a couple of methods you could choose from:

(1) Purchase a File View control (SkySoftware do one)
(2) Iterate until you create a directory name that does not exist, like
this:

Public Function GetUniqueFolder(ByVal theDirectory As String) As String

Dim theNewFolder as String = "New Folder"
Dim theCount As Integer = 0

Do
theCount += 1
Loop Until Not Directory.Exists(theDirectory & "\" & theNewFolder & " "
& theCount.ToString)

Return ( theDirectory & "\" & theNewFolder & " " & theCount.ToString )

End Function

This should iterate, adding a number to the end of each folder name, ie. :

New Folder 1
New Folder 2
New Folder 3

etc.......

until it finds one that does not exist, which is then your new folder name.



<tr**************@yahoo.com> wrote in message
news:11**********************@g49g2000cwa.googlegr oups.com...
Hi all
I am having one application where i want to implement new feature that
is 'create new folder'. and display new folder name in listview.
My listview is editable.
My problem is i want to display unique folder name to the user at a
time of creating new folder.
That is if user click on 'create new folder' by default i am displaying
text as 'New folder'.
But i want this functionality to be same as that of windows explorer.

Does any one is having any idea about it.
Please help me.
Thanks in advance.

Nov 21 '05 #2

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

Similar topics

3
by: Robert Nolan | last post by:
This subject is probably simple to the readers, but I must be having one hell of a mental block cause I am beating my head against a wall. I need to create a simple folder tree that is about 3...
0
by: Mike Connor | last post by:
I am having trouble getting Conditional Folder creation & File insertion to work using VS .Net in a Deployment Project for a C# app. I am displaying a generic Textbox Dialog under the User...
2
by: DJG | last post by:
I need some help with a TreeView control in VB.Net I've got a datatable with about 8000 rows. 500 are 'folders', and the other 7500 rows are 'jobs'. It's a logical representation of some data,...
3
by: Richard Lewis Haggard | last post by:
We are having a lot of trouble with problems relating to failures relating to 'The located assembly's manifest definition with name 'xxx' does not match the assembly reference" but none of us here...
7
by: therod | last post by:
I am running Windows Server 2003 SP1 and .Net Framework 1.1 I want to upgrade to .Net 2.0 and I'm pretty sure I should uninstall 1.1 first. Problem is that .NET 1.1 doesn't show up in Control...
1
by: Brad Isaacs | last post by:
I am working with ASP.NET 2.0 and using an SQL Server 2000 database. I am using Visual Studio 2005 and developing on my Local machine. I am working with Login controls ASP.Configuration, I...
4
by: Brad Isaacs | last post by:
I am working with ASP.NET 2.0 and using an SQL Server 2000 database. I am using Visual Studio 2005 and developing on my Local machine. I am working with Login controls ASP.Configuration, I...
2
by: sindhu sweet | last post by:
Hi friends, I am developing an IDE using java...as part of my project...i am half the way(hav created menus FILE, FONT,TEXTAREA,SCROLLBARS on both sides...) i need some help....can anyone refer...
4
by: matpac4 | last post by:
I'm a bit stuck! Please can someone help. Here's what I'm trying to build: 1. Webform which puts variables into a database (each with unique ID field) 2. Webform also allows attachment which...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
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...
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
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
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
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...

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.