473,657 Members | 2,316 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

Transform a list of file paths into a treeview

jnc
Hi,

I was wondering if anybody had any pointers on the following:

I need to write some code which takes a list of file paths and
transforms them into a treeview which shows the directory structure of
the file paths.

Cheers.....Jim
Jul 19 '05 #1
1 2060
Shams
1 New Member
Hi,

I was wondering if anybody had any pointers on the following:

I need to write some code which takes a list of file paths and
transforms them into a treeview which shows the directory structure of
the file paths.

Cheers.....Jim

There are three ways..

1) Brute force:
Create a temporaray directory and copy all the nodes there... Obviously your root node would be the temp directory.

2) You can use the DirectoryInfo or FileInfos to do the job... in .NET

3) Create Dictionary of Paths where values are either null or files.. alrighty

Cheers :)

Shams
Apr 2 '06 #2

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

Similar topics

1
2341
by: David | last post by:
I would like to be able to re-sort data in an HTML table on the without returning to the server. It seems like an XSLT should be able to accomplish this, but I can't find enough information... I have am XML file generated on the server that looks something like this: <?xml version="1.0" encoding="utf-8" ?> <?xml-stylesheet type="text/xsl" href="search.xsl"?> <AlbumSearch version="3.0" time="02Apr04 10:54:31 EST"> <SearchResults...
2
2293
by: N. Demos | last post by:
I'm having problems with a custom JS object (XMLLoadObject) I designed to load XML and XSL files, perform an XSL transform with them and embed the resultant HTML fragment into the host HTML document. I designed this object so that I could generate and embed HTML fragments from more than one XML/XSL source into a single HTML document. This is done by instantiating an XMLLoadObject with an XML filename, an XSL filename, and the ID of the...
6
2482
by: Stephen Cook | last post by:
Having worked through the problems around enabling the document function using an XmlUrlResolver I started work on building a useful class to hide the intricacies. Trying to generalise the process I've hit a snag. How do I resolve multiple external references? The transform method on a stylesheet only takes one resolver, not an array Stephen
2
3963
by: Adam G. | last post by:
Does anyone know where I can find a xslt file to transform xml into html or how to open a new browser window from asp.net to display the xml. I have a string that contains the xml that is generated from an object. I want to display the xml to the user in the browser. The format can change so writing a custom xsl is time consuming. I just want to display the xml as would be done if you open up an xml file in the web browser. However,...
0
287
by: jnc | last post by:
Hi, I was wondering if anybody had any pointers on the following: I need to write some code which takes a list of file paths and transforms them into a treeview which shows the directory structure of the file paths. Cheers.....Jim
3
2746
by: R. P. | last post by:
Subject: XSLT to transform a flat XML file into a structured text file I have an XML file that lists the PDF file segment names and titles of a larger document and looks something like this: <DOCUMENT> ...... ...... some lead elements ...... <SEGMENT_LIST>
2
3785
by: dave6502 | last post by:
Struggling newbe here, some of my #includes work, some dont. Is it possible to list the include path ? (in BASH), I have looked at the environmental variables (loads of them) but cannot find a reference. Cheers Dave
3
7329
KevinADC
by: KevinADC | last post by:
If you are entirely unfamiliar with using Perl to sort data, read the "Sorting Data with Perl - Part One and Two" articles before reading this article. Beginning Perl coders may find this article uses unfamiliar terms and syntax. Intermediate and advanced Perl coders should find this article useful. The object of the article is to inform the reader, it is not about how to code Perl or how to write good Perl code, but to teach the Schwartzian...
5
1575
by: antar2 | last post by:
Hello, I would like to read and print files, of which the complete filepaths are mentioned in another textfile. In this textfile (list.txt) are for example the following paths: /data/chorec/chorec-nieuw/s01/S01C001M1/S01C001M1_1LG_f01.TextGrid /data/chorec/chorec-nieuw/s01/S01C001M1/ S01C001M1_1LGPseudo_f01.TextGrid
0
8323
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
8838
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, it seems that the internal comparison operator "<=>" tries to promote arguments from unsigned to signed. This is as boiled down as I can make it. Here is my compilation command: g++-12 -std=c++20 -Wnarrowing bit_field.cpp Here is the code in...
0
8739
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...
1
8513
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 most users, this new feature is actually very convenient. If you want to control the update process,...
0
8613
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
7351
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
5638
by: conductexam | last post by:
I have .net C# application in which I am extracting data from word file and save it in database particularly. To store word all data as it is I am converting the whole word file firstly in HTML and then checking html paragraph one by one. At the time of converting from word file to html my equations which are in the word document file was convert into image. Globals.ThisAddIn.Application.ActiveDocument.Select();...
0
4173
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 the same network. But I'm wondering if it's possible to do the same thing, with 2 Pfsense firewalls...
2
1732
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.