Want to protect your cyber security and still get fast solutions? Ask a secure question today.Go Premium

x
?
Solved

File Headers

Posted on 2003-02-19
7
Medium Priority
?
230 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
6 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
Concerto's Cloud Advisory Services

Want to avoid the missteps to gaining all the benefits of the cloud? Learn more about the different assessment options from our Cloud Advisory team.

 
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

What does it mean to be "Always On"?

Is your cloud always on? With an Always On cloud you won't have to worry about downtime for maintenance or software application code updates, ensuring that your bottom line isn't affected.

Question has a verified solution.

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

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…
This tutorial is posted by Aaron Wojnowski, administrator at SDKExpert.net.  To view more iPhone tutorials, visit www.sdkexpert.net. This is a very simple tutorial on finding the user's current location easily. In this tutorial, you will learn ho…
The goal of this video is to provide viewers with basic examples to understand opening and writing to files in the C programming language.
The goal of this video is to provide viewers with basic examples to understand and use switch statements in the C programming language.
Suggested Courses

577 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