944,111 Members | Top Members by Rank

Ad:
  • C# Discussion Thread
  • Unsolved
  • Views: 6618
  • C# RSS
Oct 24th, 2004
0

Need help manipulating files/directories

Expand Post »
Hi,

I am thinking about writing a program to compare MP3's in different directories that will compare file size, ID3 tags, bit rate etc. I want to be able to search the computer for MP3 files, then list them in a rich text box like you would see in windows explorer, showing duplicate files in another rich text box and be able to compare them. I quite haven't got to file manipulation in my C# class, I have already taken C++.
I also want to be able to select a file listed in the rich text box and get further info. I have read so far that I could possible use a FileInfo object to represent a file. How would I attemp to search the computer for them? As I find the files would I put them into a FileInfo Array? How would I get them to display in the Rich Text Box or any better alternative?
Not looking for somebody to do it for me, just give me some ideas/direction as I've never done this type of thing in Windows Forms/C# programming.

Thanks

Josh
Similar Threads
Reputation Points: 10
Solved Threads: 0
Newbie Poster
radioman28 is offline Offline
8 posts
since Jun 2003
Dec 16th, 2004
0

Re: Need help manipulating files/directories

I wouldn't know how to compare the files, but I suggest maybe using a ListBox instead of a RichTextBox?
Also, back in VB6, if you wanted to scan a whole drive or something, I would use a For statement for each directory, and for each directory in that directory, and so on. Picking up mp3 files while scanning could be done by an If CurrentFile = Right$(".mp3").
Maybe this could be done in C#? I'm quite sure the substring() could be used to replace the Right$(). I don't know about the DirectoryList (it was a component in VB6).

I hope I helped a bit.
Reputation Points: 10
Solved Threads: 0
Newbie Poster
Crescent Cross is offline Offline
4 posts
since Dec 2004
Apr 14th, 2005
0

Re: Need help manipulating files/directories

.NET has a nice set of File/Directory manipulation classes built right in. Check out the System.IO namespace.

Seth Webster
Reputation Points: 10
Solved Threads: 0
Newbie Poster
SethWebster is offline Offline
7 posts
since Apr 2005

This thread is more than three months old

No one has posted to this discussion for at least three months. Please let old threads die and do not reply to them unless you feel you have something new and valuable to contribute that absolutely must be added to make the discussion complete. Otherwise, please start a new thread in this forum instead.
Message:
Previous Thread in C# Forum Timeline: Printing a textbox?
Next Thread in C# Forum Timeline: Opensource IDE





About Us | Contact Us | Advertise | Acceptable Use Policy
Forum Index | Build Custom RSS Feed


Follow us on Twitter


© 2011 DaniWeb® LLC