943,640 Members | Top Members by Rank

Ad:
  • C# Discussion Thread
  • Unsolved
  • Views: 12044
  • C# RSS
May 19th, 2006
1

help with file header

Expand Post »
hiii all
do any1 knows how to read the header of a file to know its format
as example if i've a mp3 file but it's name do not include .mp3
i wanna make a program that read the header of the file and detect it's format but i dont know how to read the header in c#
plzzzzzzzz help anythng u send could help :)
tnx
Similar Threads
Reputation Points: 15
Solved Threads: 0
Newbie Poster
matika is offline Offline
19 posts
since May 2004
May 19th, 2006
1

Re: help with file header

Perhaps this will help?

http://www.devhood.com/tutorials/tut...tutorial_id=79


I am sure, you could get what you need from that code, in order to throw together a little class to do what you want.
Team Colleague
Reputation Points: 84
Solved Threads: 99
<Insert title here>
tayspen is offline Offline
1,542 posts
since Jul 2005
May 23rd, 2006
1

Re: help with file header

I tried this a while ago, and its not 100% possible because i think not all files contain a header or such that says what the file is
Reputation Points: 23
Solved Threads: 16
Posting Whiz in Training
plazmo is offline Offline
206 posts
since Aug 2005
May 23rd, 2006
1

Re: help with file header

Quote originally posted by matika ...
hiii all
do any1 knows how to read the header of a file to know its format
as example if i've a mp3 file but it's name do not include .mp3
i wanna make a program that read the header of the file and detect it's format but i dont know how to read the header in c#
plzzzzzzzz help anythng u send could help
tnx
try.....string extension = Path.GetExtension(file);
Reputation Points: 13
Solved Threads: 1
Newbie Poster
MrBenz is offline Offline
4 posts
since May 2006
May 23rd, 2006
1

Re: help with file header

He wants to use the header of the file.

What if for some reason it has no extension? Then that way won't work .
Team Colleague
Reputation Points: 84
Solved Threads: 99
<Insert title here>
tayspen is offline Offline
1,542 posts
since Jul 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: Convert a string (diffrent formats) to date
Next Thread in C# Forum Timeline: Cannot Test For Condition





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


Follow us on Twitter


© 2011 DaniWeb® LLC