file list
-
Hi working on my first ever project with c# in visual studio 2008 using net framework 3.5 i'm trying to work out how to display a list of AVI files from a fixed directry (c:\video) and have that list update itself everytime a new file is added and to highlight the latest flle. been looking and trying things out for over 2 weeks and getting no where so any help would be great, even just getting the list of AVI files to display would be a great start thanks kenny
-
Hi working on my first ever project with c# in visual studio 2008 using net framework 3.5 i'm trying to work out how to display a list of AVI files from a fixed directry (c:\video) and have that list update itself everytime a new file is added and to highlight the latest flle. been looking and trying things out for over 2 weeks and getting no where so any help would be great, even just getting the list of AVI files to display would be a great start thanks kenny
Searching for 2 weeks you must have encountered Directory.GetFiles() and FileSystemWatcher many times, and have become an expert in using them. :)
Luc Pattyn
Have a look at my entry for the lean-and-mean competition; please provide comments, feedback, discussion, and don’t forget to vote for it! Thank you.
Local announcement (Antwerp region): Lange Wapper? Neen!
-
Hi working on my first ever project with c# in visual studio 2008 using net framework 3.5 i'm trying to work out how to display a list of AVI files from a fixed directry (c:\video) and have that list update itself everytime a new file is added and to highlight the latest flle. been looking and trying things out for over 2 weeks and getting no where so any help would be great, even just getting the list of AVI files to display would be a great start thanks kenny
use
string[] files = Directory.GetFiles("path", "*.avi");
Path represents the path of the directory, in your case its C:\video :thumbsup:
Abhishek Sur
My Latest Articles **Create CLR objects in SQL Server 2005 C# Uncommon Keywords Read/Write Excel using OleDB
**Don't forget to click "Good Answer" if you like to.
-
Searching for 2 weeks you must have encountered Directory.GetFiles() and FileSystemWatcher many times, and have become an expert in using them. :)
Luc Pattyn
Have a look at my entry for the lean-and-mean competition; please provide comments, feedback, discussion, and don’t forget to vote for it! Thank you.
Local announcement (Antwerp region): Lange Wapper? Neen!
-
Searching for 2 weeks you must have encountered Directory.GetFiles() and FileSystemWatcher many times, and have become an expert in using them. :)
Luc Pattyn
Have a look at my entry for the lean-and-mean competition; please provide comments, feedback, discussion, and don’t forget to vote for it! Thank you.
Local announcement (Antwerp region): Lange Wapper? Neen!
That depends on where you search.
-
That depends on where you search.
-
That depends on where you search.
why, high and low, of course. :)
Luc Pattyn
Have a look at my entry for the lean-and-mean competition; please provide comments, feedback, discussion, and don’t forget to vote for it! Thank you.
Local announcement (Antwerp region): Lange Wapper? Neen!
-
use
string[] files = Directory.GetFiles("path", "*.avi");
Path represents the path of the directory, in your case its C:\video :thumbsup:
Abhishek Sur
My Latest Articles **Create CLR objects in SQL Server 2005 C# Uncommon Keywords Read/Write Excel using OleDB
**Don't forget to click "Good Answer" if you like to.
-
Hi Being very very limited in my knowledge of this could you help me a little further as to what else i need to add to make that bit of code work, assume i'm starting with a blank form! kenny
If you want a personal mentor, you'll have to earn one first. I suggest you start here[^]. :)
Luc Pattyn
Have a look at my entry for the lean-and-mean competition; please provide comments, feedback, discussion, and don’t forget to vote for it! Thank you.
Local announcement (Antwerp region): Lange Wapper? Neen!
-
If you want a personal mentor, you'll have to earn one first. I suggest you start here[^]. :)
Luc Pattyn
Have a look at my entry for the lean-and-mean competition; please provide comments, feedback, discussion, and don’t forget to vote for it! Thank you.
Local announcement (Antwerp region): Lange Wapper? Neen!
-
Google is a great place however even that doesn't always give you what you want in a format you understand, everyone got to ask to learn kenny
Well, you just have to know WHAT to ask of Google and HOW to ask it. This is where the most important skill as a programmer comes into play. It's not the ability to write code or understand the language. It's the ability to do research and teach yourself.
A guide to posting questions on CodeProject[^]
Dave Kreskowiak Microsoft MVP Visual Developer - Visual Basic
2006, 2007, 2008
But no longer in 2009... -
The question itself is not a problem, assuming you are willing to learn and make an effort. And if you want to be spoon fed all your life, that is your choice. No big deal except for yourself. :|
Luc Pattyn
Have a look at my entry for the lean-and-mean competition; please provide comments, feedback, discussion, and don’t forget to vote for it! Thank you.
Local announcement (Antwerp region): Lange Wapper? Neen!
-
Hi working on my first ever project with c# in visual studio 2008 using net framework 3.5 i'm trying to work out how to display a list of AVI files from a fixed directry (c:\video) and have that list update itself everytime a new file is added and to highlight the latest flle. been looking and trying things out for over 2 weeks and getting no where so any help would be great, even just getting the list of AVI files to display would be a great start thanks kenny
Very easy. C# 'FileSystemWatcher' object can help you. //for example FileSystemWatcher p = new FileSystemWatcher(@"c:\video"); p.EnableRaisingEvents = true; p.IncludeSubdirectories = true; p.Changed+=new FileSystemEventHandler(p_Changed); p.Created+=new FileSystemEventHandler(p_Created); p.Deleted+=new FileSystemEventHandler(p_Deleted);
April Comm100 - Leading Live Chat Software Provider