?
Solved

File Headers

Posted on 2003-02-19
7
Medium Priority
?
229 Views
Last Modified: 2010-04-15
Hi, i'm trying to write a program to handle some file headers (EXE, COM, TXT, GIF, JPG, BMP), but i can't find information about the header structure of these format, specially i want to get the date, the name, the size and the type of the file (getting all from its header). I'll appreciate your help about anyone of the headers. And i'm sorry for my english :P i hope it be understable.
0
Comment
Question by:WeiMx
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
7 Comments
 
LVL 5

Accepted Solution

by:
Kocil earned 100 total points
ID: 7985613
I think you do not need to read the header to get those information. In fact, those information are NOT in the header.
  - date, some header contains it, but not all.
  - name, never in the header.
  - size, maybe in the header, but usually only data size.
  - type. Yes it's always in the header, but 99% the file
    extension is right.

So why don't you use the simple findfirst command ?.

0
 

Assisted Solution

by:nabeen
nabeen earned 100 total points
ID: 7985801
hi there,
          use findfirst and findnext function to find the required file and u can then find the size,name, etc by using ffblk.ff_name,ffblk.ff_fsize, see the required header file for that.
bye
0
 

Expert Comment

by:nabeen
ID: 7985804
search for ffblk command in header file there u will find all the required information that u can access about the file.
0
VIDEO: THE CONCERTO CLOUD FOR HEALTHCARE

Modern healthcare requires a modern cloud. View this brief video to understand how the Concerto Cloud for Healthcare can help your organization.

 
LVL 1

Expert Comment

by:cybeonix
ID: 7986196
Tons of file information on some websites. One of my favorites http://www.wotsit.org/
0
 

Expert Comment

by:gotenks
ID: 8031152
check out this page if you are not sure of how to use the _findfirst and _findnext function suggested by kocil and nabeen.

http://msdn.microsoft.com/library/default.asp?url=/library/en-us/vccore98/HTML/_crt__findnext.2c_._findnexti64.2c_._wfindnext.2c_._wfindnexti64.asp

hope this will help.
0
 
LVL 20

Expert Comment

by:jmcg
ID: 10006632
Nothing has happened on this question in over 10 months. It's time for cleanup!

My recommendation, which I will post in the Cleanup topic area, is to
split points between Kocil and nabeen.

PLEASE DO NOT ACCEPT THIS COMMENT AS AN ANSWER!

jmcg
EE Cleanup Volunteer
0

Featured Post

Independent Software Vendors: We Want Your Opinion

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

An Outlet in Cocoa is a persistent reference to a GUI control; it connects a property (a variable) to a control.  For example, it is common to create an Outlet for the text field GUI control and change the text that appears in this field via that Ou…
Preface I don't like visual development tools that are supposed to write a program for me. Even if it is Xcode and I can use Interface Builder. Yes, it is a perfect tool and has helped me a lot, mainly, in the beginning, when my programs were small…
The goal of this video is to provide viewers with basic examples to understand and use structures in the C programming language.
The goal of this video is to provide viewers with basic examples to understand how to create, access, and change arrays in the C programming language.
Suggested Courses
Course of the Month12 days, 8 hours left to enroll

777 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question