Link to home
Start Free TrialLog in
Avatar of jinal
jinalFlag for India

asked on

how to format floppy disk using c?

dear friends,
            i want to format floopy disk using c?
please help me.
Avatar of gj62
gj62

system("format a:");

Formatting a disk is OS specific - there is no standard C call to do this...
you want to format the floppy using C?
OR
you want to write source code in C for formatting the floppy? // i mean implement the format command ?
both gj62 and akshayxx are correct...

However, asuming you are developing this on win32 platform and the "format" executable is in your applications PATH variable you could use a system call to format the drive desired...

i.e.

printf("enter drive letter to format: ");
gets(drive)

sprintf(command, "format %s", drive);
system(command);

...

this is very specific to win32.. what OS are you using and is this close to what you are trying to do...

rdest5
ASKER CERTIFIED SOLUTION
Avatar of plushey
plushey

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
Nothing has happened on this question in more than 9 months. It's time for cleanup!

My recommendation, which I will post in the Cleanup topic area, is to
accept answer by plushey [grade B] (a hint, not a solution).

PLEASE DO NOT ACCEPT THIS COMMENT AS AN ANSWER!

jmcg
EE Cleanup Volunteer