Hello DaniWeb, it has been a while since I have asked a question here so I thought now would be a great time to do so. I am creating an application that loops through the file names of a specific directory, in this case, the System32 folder. I want the program to compile a list of the file names and then I want the file names to be displayed on a Timer_Tick event so the name will change on every tick. If anyone could provide a snippet of code to achieve this that would be great. I have been researching and debugging all night with no luck. Thanks and have a great day!


6 Years
Discussion Span
Last Post by Reverend Jim

You can get the list of files with

Dim filelist() As String = System.IO.Directory.GetFiles("c:\windows\system32")

Use a class variable to keep track of which file name to display next. The timer tick handler can advance the index (and wrap to zero if you want to repeat).

Edited by Reverend Jim: n/a

Votes + Comments
This question has already been answered. Start a new discussion instead.
Have something to contribute to this discussion? Please be thoughtful, detailed and courteous, and be sure to adhere to our posting rules.