Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]


Groups > comp.lang.basic.visual.misc > #1082

Re: VB.net (2010) Beginner Question: Directory Lists

From "Mayayana" <mayayana@invalid.nospam>
Newsgroups comp.lang.basic.visual.misc
Subject Re: VB.net (2010) Beginner Question: Directory Lists
Date 2012-05-20 09:41 -0400
Organization A noiseless patient Spider
Message-ID <jparvr$qgq$1@dont-email.me> (permalink)
References <ecf4ddec-cccd-4eaa-a24b-7a0e22213b9f@ns1g2000pbc.googlegroups.com>

Show all headers | View raw


The newsgroup Mike is referring to is here:

microsoft.public.dotnet.languages.vb

  But it may not be very busy. Microsoft officially
ended support for their own newgroups, so MVPs don't
get any points for answering newsgroup questions.
As a result, most MVPs immediately switched to the
webpage forums and the newsgroups have become
relatively quiet.

  There's a webpage forum for VB.Net here:

http://social.msdn.microsoft.com/Forums/en/vbgeneral/threads

  The forums get more traffic but they're moderated,
awkward to use, and require that you "join the club"
as a member before you can post. They also have a
general marketing slant. Microsoft is specifically avoiding
any sort of forum where programmers can discuss freely.
Their web forums -- both in content and in categories
available -- are designed to market Microsoft products.

  There may be good reason that you're using .Net. You
didn't explain that. But personally, if I were doing something
like what you plan I think I'd do it with an HTA using VBScript.
What you want to achieve is very basic. It can probably be
done quickly and easily with script. With VB.Net 2010, anyone
who wants to run your software will need something like 1/2
GB of .Net Framework files, for what can be done in a few
KB with script. .Net Framework 4 (2010 version) is not
pre-installed on any Windows version. In other words, you're
planning to use an 18-wheeler to ship a letter-size package.

 .Net was never really designed for Windows software. It is a
Java clone, designed for writing server-side applets and "web
services":

http://www.microsoft.com/en-us/news/press/2000/jul00/pdcdeliverspr.aspx

  Microsoft are trying to push 3rd-party developers, other
than approved partners, out of the Windows platform. So
they pretended that .Net was good for writing Windows
software. ...Ever wonder why .Net is supposedly well-suited
for Windows software despite the fact that Java has been
around much longer and is rarely used for Windows software?

  Now .Net is being retooled so that people can write Metro
trinkets with it. For Metro you'll need the same 1/2 GB of support
files to write a program using the WinRT API. So .Net will load
to call WinRT, which will load to call the Win32 API with restricted
access, all to produce something surprisingly similar to an HTA!
Your letter-size package will now be shipping via ocean liner. :)

| how can I now filter out the address and extension text and just
| display the word?

  That's a good example of something that script is well-suited
for. With the FileSystemObject in VBScript, it's easy to get a
list of files in a folder, and there's even a specific method for
getting a file name from a path:  GetBaseName
  With script in an HTA it's easy to add those names to a SELECT
element, which is essentially a listbox.

----------------------------------------

--
"Sandwich" <liam.whan@gmail.com> wrote in message 
news:ecf4ddec-cccd-4eaa-a24b-7a0e22213b9f@ns1g2000pbc.googlegroups.com...
| Hi All,
|
| This is an extreme beginner question so if these type of questions
| annoy you then probably best not read this one.
|
| For those of you willing to help this will be a great learning xp for
| me.
|
|
| B'Ground: I am created an app that will catelogue short videos of the
| signs (sign language) of a woman who has a disability.
|
| As I am an extreme novice I am having trouble adding flexibility to
| the list of video files that the program displays
|
| Ultimately I want the app to:
| 1. Get the addresses of contents of a specified directory with the
| *.wmv extension and place these addresses in an array (arrFileAddress)
| 2. Get the name of each file within this array WITHOUT the address (c:
| \whatever...) and without the extention (.wmv) so that "C:\Whatever
| \Barbeque.wmv" = "Barbeque",  and place these into a listbox so that
| when the user clicks on a Word (ie. "Barbeque") I can pass the address
| to the WindowsMediaPlayer Object as an input to play the file
|
| So...
|
| I have been able to find the followingwith endless searching
|
| [code]
| ' make a reference to a directory
|    Dim di As New IO.DirectoryInfo("c:\")
|    Dim diar1 As IO.FileInfo() = di.GetFiles()
|    Dim dra As IO.FileInfo
|
|   'list the names of all files in the specified directory
|    For Each dra In diar1
|        ListBox1.Items.Add(dra)
|    Next
| [/code]
|
| Thsi obviously gives me a string array of the file addresses and
| names;
|
| how can I now filter out the address and extension text and just
| display the word?
|
|
| Thanks so much for any help you can offer. 

Back to comp.lang.basic.visual.misc | Previous | NextPrevious in thread | Next in thread | Find similar


Thread

VB.net (2010) Beginner Question: Directory Lists Sandwich <liam.whan@gmail.com> - 2012-05-19 22:10 -0700
  Re: VB.net (2010) Beginner Question: Directory Lists "Mike Williams" <Mike@WhiskyAndCoke.com> - 2012-05-20 10:24 +0100
  Re: VB.net (2010) Beginner Question: Directory Lists "Mayayana" <mayayana@invalid.nospam> - 2012-05-20 09:41 -0400
  Re: VB.net (2010) Beginner Question: Directory Lists "Auric__" <not.my.real@email.address> - 2012-05-20 19:27 +0000
    Re: VB.net (2010) Beginner Question: Directory Lists Sandwich <liam.whan@gmail.com> - 2012-05-20 19:06 -0700
      Re: VB.net (2010) Beginner Question: Directory Lists "Mayayana" <mayayana@invalid.nospam> - 2012-05-20 23:32 -0400
        Re: VB.net (2010) Beginner Question: Directory Lists Sandwich <liam.whan@gmail.com> - 2012-05-20 22:05 -0700
      Re: VB.net (2010) Beginner Question: Directory Lists Gordon Levi <gordon@address.invalid> - 2012-05-23 01:37 +1000
        Re: VB.net (2010) Beginner Question: Directory Lists "Mayayana" <mayayana@invalid.nospam> - 2012-05-22 13:24 -0400
          Re: VB.net (2010) Beginner Question: Directory Lists Tom Shelton <tom_shelton@comcast.invalid> - 2012-05-22 11:30 -0600
            Re: VB.net (2010) Beginner Question: Directory Lists "Mayayana" <mayayana@invalid.nospam> - 2012-05-22 14:03 -0400
              Re: VB.net (2010) Beginner Question: Directory Lists Tom Shelton <tom_shelton@comcast.invalid> - 2012-05-22 12:15 -0600
                Re: VB.net (2010) Beginner Question: Directory Lists "Mayayana" <mayayana@invalid.nospam> - 2012-05-22 15:05 -0400
                Re: VB.net (2010) Beginner Question: Directory Lists Tom Shelton <tom_shelton@comcast.invalid> - 2012-05-22 14:01 -0600
                Re: VB.net (2010) Beginner Question: Directory Lists "Mayayana" <mayayana@invalid.nospam> - 2012-05-22 17:29 -0400
                Re: VB.net (2010) Beginner Question: Directory Lists Tom Shelton <tom_shelton@comcast.invalid> - 2012-05-22 17:13 -0600
                Re: VB.net (2010) Beginner Question: Directory Lists "Mayayana" <mayayana@invalid.nospam> - 2012-05-23 09:10 -0400
                Re: VB.net (2010) Beginner Question: Directory Lists Tom Shelton <tom_shelton@comcast.invalid> - 2012-05-23 10:24 -0600
                Re: VB.net (2010) Beginner Question: Directory Lists Tom Shelton <tom_shelton@comcast.invalid> - 2012-05-22 14:37 -0600
                Re: VB.net (2010) Beginner Question: Directory Lists "Mayayana" <mayayana@invalid.nospam> - 2012-05-25 10:55 -0400
            Re: VB.net (2010) Beginner Question: Directory Lists "Mayayana" <mayayana@invalid.nospam> - 2012-05-22 14:38 -0400
              Re: VB.net (2010) Beginner Question: Directory Lists Tom Shelton <tom_shelton@comcast.invalid> - 2012-05-22 12:47 -0600
          Re: VB.net (2010) Beginner Question: Directory Lists Gordon Levi <gordon@address.invalid> - 2012-05-24 23:44 +1000
            Re: VB.net (2010) Beginner Question: Directory Lists "Mayayana" <mayayana@invalid.nospam> - 2012-05-24 10:07 -0400
            Re: VB.net (2010) Beginner Question: Directory Lists "Mike Williams" <Mike@WhiskyAndCoke.com> - 2012-05-24 16:07 +0100
              Re: VB.net (2010) Beginner Question: Directory Lists Tom Shelton <tom_shelton@comcast.invalid> - 2012-05-24 09:57 -0600
              Re: VB.net (2010) Beginner Question: Directory Lists Gordon Levi <gordon@address.invalid> - 2012-05-25 18:39 +1000
                Re: VB.net (2010) Beginner Question: Directory Lists "Mike Williams" <Mike@WhiskyAndCoke.com> - 2012-05-25 11:23 +0100
                Re: VB.net (2010) Beginner Question: Directory Lists Gordon Levi <gordon@address.invalid> - 2012-05-27 23:07 +1000
                Re: VB.net (2010) Beginner Question: Directory Lists "Mike Williams" <Mike@WhiskyAndCoke.com> - 2012-05-27 16:44 +0100
                Re: VB.net (2010) Beginner Question: Directory Lists ralph <nt_consulting64@yahoo.com> - 2012-05-27 17:12 -0500
                Re: VB.net (2010) Beginner Question: Directory Lists "Mike Williams" <Mike@WhiskyAndCoke.com> - 2012-05-30 07:04 +0100
                Re: VB.net (2010) Beginner Question: Directory Lists ralph <nt_consulting64@yahoo.com> - 2012-05-30 02:36 -0500
                Re: VB.net (2010) Beginner Question: Directory Lists "Mike Williams" <Mike@WhiskyAndCoke.com> - 2012-05-31 08:54 +0100
                Re: VB.net (2010) Beginner Question: Directory Lists ralph <nt_consulting64@yahoo.com> - 2012-05-31 10:33 -0500
                Re: VB.net (2010) Beginner Question: Directory Lists Gordon Levi <gordon@address.invalid> - 2012-05-30 23:19 +1000
                Re: VB.net (2010) Beginner Question: Directory Lists ralph <nt_consulting64@yahoo.com> - 2012-05-30 14:09 -0500
        Re: VB.net (2010) Beginner Question: Directory Lists GS <gs@somewhere.net> - 2012-05-25 13:44 -0400
          Re: VB.net (2010) Beginner Question: Directory Lists -mhd <not_real@invalid.com> - 2012-05-25 17:47 -0400
            Re: VB.net (2010) Beginner Question: Directory Lists GS <gs@somewhere.net> - 2012-05-25 19:51 -0400
      Re: VB.net (2010) Beginner Question: Directory Lists Tom Shelton <tom_shelton@comcast.invalid> - 2012-05-22 11:09 -0600
        Re: VB.net (2010) Beginner Question: Directory Lists "Mike Williams" <Mike@WhiskyAndCoke.com> - 2012-05-23 13:07 +0100
          Re: VB.net (2010) Beginner Question: Directory Lists Tom Shelton <tom_shelton@comcast.invalid> - 2012-05-23 10:14 -0600
            Re: VB.net (2010) Beginner Question: Directory Lists Schmidt <sss@online.de> - 2012-05-24 20:38 +0200
              Re: VB.net (2010) Beginner Question: Directory Lists Tom Shelton <tom_shelton@comcast.invalid> - 2012-05-24 15:46 -0600
                Re: VB.net (2010) Beginner Question: Directory Lists "Mike Williams" <Mike@WhiskyAndCoke.com> - 2012-05-25 06:52 +0100
                Re: VB.net (2010) Beginner Question: Directory Lists Schmidt <sss@online.de> - 2012-05-25 11:14 +0200
                Re: VB.net (2010) Beginner Question: Directory Lists "DaveO" <djo@dial.pipex.com> - 2012-05-25 10:57 +0100
                Re: VB.net (2010) Beginner Question: Directory Lists Schmidt <sss@online.de> - 2012-05-25 13:36 +0200
                Re: VB.net (2010) Beginner Question: Directory Lists "Mayayana" <mayayana@invalid.nospam> - 2012-05-25 09:25 -0400
                Re: VB.net (2010) Beginner Question: Directory Lists Tom Shelton <tom_shelton@comcast.invalid> - 2012-05-25 10:12 -0600
                Re: VB.net (2010) Beginner Question: Directory Lists "Mayayana" <mayayana@invalid.nospam> - 2012-05-25 12:27 -0400
                Re: VB.net (2010) Beginner Question: Directory Lists Tom Shelton <tom_shelton@comcast.invalid> - 2012-05-25 14:22 -0600
                Re: VB.net (2010) Beginner Question: Directory Lists Schmidt <sss@online.de> - 2012-05-26 18:38 +0200
                Re: VB.net (2010) Beginner Question: Directory Lists Tom Shelton <tom_shelton@comcast.invalid> - 2012-05-26 14:12 -0600
                Re: VB.net (2010) Beginner Question: Directory Lists "Henning" <computer_hero@coldmail.com> - 2012-05-26 23:31 +0200
                Re: VB.net (2010) Beginner Question: Directory Lists "Mayayana" <mayayana@invalid.nospam> - 2012-05-26 18:07 -0400
                Re: VB.net (2010) Beginner Question: Directory Lists Tom Shelton <tom_shelton@comcast.invalid> - 2012-05-26 16:50 -0600
                Re: VB.net (2010) Beginner Question: Directory Lists "Mayayana" <mayayana@invalid.nospam> - 2012-05-26 20:53 -0400
                Re: VB.net (2010) Beginner Question: Directory Lists Tom Shelton <tom_shelton@comcast.invalid> - 2012-05-26 20:31 -0600
                Re: VB.net (2010) Beginner Question: Directory Lists "Mayayana" <mayayana@invalid.nospam> - 2012-05-27 09:49 -0400
                Re: VB.net (2010) Beginner Question: Directory Lists Karl E. Peterson <karl@exmvps.org> - 2012-05-29 12:50 -0700
                Re: VB.net (2010) Beginner Question: Directory Lists "Mayayana" <mayayana@invalid.nospam> - 2012-05-29 19:14 -0400
                Re: VB.net (2010) Beginner Question: Directory Lists ralph <nt_consulting64@yahoo.com> - 2012-05-29 18:25 -0500
                Re: VB.net (2010) Beginner Question: Directory Lists "Mike Williams" <Mike@WhiskyAndCoke.com> - 2012-05-30 06:51 +0100

csiph-web