Display_Information read file and directory information function to recovery for specified file

Files Recovery Software
Home Contact Details Customer Support Download Demo Products  

 
 

Comments on coding:

The function Display_Information is to read the file and directory information and from the root directory. In the Structure we are reading the 32 bytes information for every file or directory with root[32].

The unsigned integer arrays name[8] and ext[3] are for File or Directory name for DOS in 8.3 (Eight Dot Three) Format. Similarly one byte is for attribute and two bytes for starting cluster. long unsigned int size; is to store the size of the file of four bytes.

The _bios_disk function reads the sector, specified by the structure finfo and the status of the operation is stored in result.

From the every information of 512 bytes read by the _bios_disk function, till the root directory area ends, we collect the information of the files and directories stored in the disk and display them on the screen.

The integer file_no is stores the number of the file or directory in the list, starting from 0. Generally the size of root directory is of 14 sectors and root directory generally starts from Cylinder =0, Head = 0 and Sector =2 in case of 1.44MB and 3½ floppy disk.

If user gives the character ‘M’ or ‘m’ as input, the information of next sector is displayed if the choice by user is ‘R’ or ‘r’ the recovery functions are called. The coding of the function recover() has been given below:

/* Function To Start Recovery for The Specified File */

void recover(unsigned int *root,unsigned int len)

{
void clear_the_line(unsigned int r); /* Function to Clear a Row on the Screen */

/* Function to Integrate The Specified File */

void integrate(long unsigned int,unsigned int,
unsigned int,unsigned int);

unsigned int file_no,i;
char ch;
unsigned int *loc;
unsigned int cylinder,head,sector;
unsigned int start;
long unsigned int size;

clear_the_line(21); /* Clear The Row Number 21 */
clear_the_line(22); /* Clear The Row Number 22 */
clear_the_line(23); /* Clear The Row Number 23 */
clear_the_line(24); /* Clear The Row Number 24 */

gotoxy(10,21);
cprintf("Enter FNO. of the file you want to recover");
scanf("%u",&file_no); /* Get the File No. to be
Recovered */

loc=(root+(len*file_no/2));

Previous page

page 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 | 15 | 16 | 17 | 18 | 19 | 20


page 21 | 22 | 23 | 24 | 25 | 26 | 27 | 28 | 29 | 30 | 31 | 32 | 33

Next page
 
 
Data Recovery Book
 
Chapter 1 An Overview of Data Recovery
Chapter 2 Introduction of Hard Disks
Chapter 3 Logical Approach to Disks and OS
Chapter 4 Number Systems
Chapter 5 Introduction of C Programming
Chapter 6 Introduction to Computer Basics
Chapter 7 Necessary DOS Commands
Chapter 8 Disk-BIOS Functions and Interrupts Handling With C
Chapter 9 Handling Large Hard Disks
Chapter 10 Data Recovery From Corrupted Floppy
Chapter 11 Making Backups
Chapter 12 Reading and Modifying MBR with Programming
Chapter 13 Reading and Modifying DBR with Programming
Chapter 14 Programming for “Raw File” Recovery
Chapter 15 Programming for Data Wipers
Chapter 16 Developing more Utilities for Disks
Appendix Glossary of Data Recovery Terms
 
 
Pro Data Doctor

Home

Products

Contact Details

Customer Support

Download Demo

Terms and Conditions

 
Pro Data Doctor