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

Selecting a folder and all contents within

Hi,
I am using vb.net with visual studio 2008. I have the need to have a user select a directory on a network drive to bring up a folder with a very extensive list of files. The file names within this directory are what I'm concerned with and I will need to write all these file names to a textfile in order to do a comparison with an existing text file. The user must be able to select this folder themselves.

At this point I am trying to use the openfiledialog box to open the folder however it is requiring that I select a specific file which is not my need. I need the whole folder.
I currently have a filter that is allowing all files.
Expand|Select|Wrap|Line Numbers
  1. fdlg.Filter = "All files (*.*)|*.*|All files (*.*)
|*.*

I assume that there is another way to do this but I am currently unaware of that way.

Any suggestions would be greatly appreciated.
Thanks,
Starlight849
Jul 16 '10 #1
1 1063
ThatThatGuy
449 Expert 256MB
@starlight849
Instead of using OpenFileDialog you can go in for FolderBrowserDialog.. which displays only folder view..

Get the Seelcted folder and by Directory.GetFiles()
(or something like that) get all files under the selected folder
Jul 19 '10 #2

Sign in to post your reply or Sign up for a free account.

Similar topics

0
by: John Dalberg | last post by:
How can I enable "list folder contents" ntfs permission only programmatically? The docs for cacls and xcalcs do not have an example to set this up without setting up the other read permissions. ...
2
by: Ann | last post by:
Hi, Is there a way i can access the contents of a folder from xml and print it out ? (For eg:- some thing like Filesystemobject in vb ) Any help will be appreciated.. Thanks, Ann
3
by: scoop_77 | last post by:
I'm looking for some software that would allow me to point to a folder in Windows Explorer, and have it output an html file with hyperlinks to all of the files within that folder and all of the...
1
by: Stephen | last post by:
Hi, Is there a sample application using ASP .NET to synchronize folder contents? I want to synchronize folder contents on 2 different machines Thanks, Stephen
1
by: jon.ingram | last post by:
I need some vb code that I could perhaps run from access that will look in a particular folder I could specify in the code, and convert all the files (just excel are saved there) to .csv. Is...
2
by: ankita | last post by:
Hello, i am using Asp.net application to read contents of FTP folder. I just want to have names of all folders/files that are inside FTP directory. So for that i don't want to download any...
1
by: tula123 | last post by:
Hi - I'm new to forums so I hope I'm going about this the right way... I wrote a 'quick' VB program to print the filenames within a folder. After the Print Dialog Box comes up and you select your...
1
by: Jim in Arizona | last post by:
Anyone know a way or a document that shows how to display the contents (word & excel docs, etc) of a folder as links on a web form that link to the document? TIA, Jim
7
by: devnew | last post by:
hi i am trying to create a cache of digitized values of around 100 image files in a folder..In my program i would like to know from time to time if a new image has been added or removed from the...
1
by: CloudSolutions | last post by:
Introduction: For many beginners and individual users, requiring a credit card and email registration may pose a barrier when starting to use cloud servers. However, some cloud server providers now...
0
by: Faith0G | last post by:
I am starting a new it consulting business and it's been a while since I setup a new website. Is wordpress still the best web based software for hosting a 5 page website? The webpages will be...
0
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 3 Apr 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome former...
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...
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: 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:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...

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.