Format a Partition

Please support our C advertiser: Programming Forums - DaniWeb Sister Site
Reply

Join Date: May 2004
Posts: 141
Reputation: meabed is on a distinguished road 
Solved Threads: 3
Team Colleague
meabed's Avatar
meabed meabed is offline Offline
Junior Poster

Re: Clearing the screen

 
0
  #1
May 13th, 2004
I tried to desigen program that format partition from the HDD. like D:... then
i right this code
  1. #include<process.h>
  2. int main()
  3. {
  4. system("d:");
  5. system("format d: /q");
  6. system("y");
  7. return 0;
  8. }
but it comes to ( " all data on non_removalbe disk
driver d:will be lost !
proceed with format (Y/N)?
and stop .... howver i right " system("Y");
...i dont know what's the wrong ?? :rolleyes:
Reply With Quote Quick reply to this message  
Join Date: Apr 2004
Posts: 4
Reputation: wildrider30 is an unknown quantity at this point 
Solved Threads: 0
wildrider30 wildrider30 is offline Offline
Newbie Poster

Re: Clearing the screen

 
0
  #2
May 13th, 2004
Actually the <conio,h> works....atleast if u use "void main()"
N you shud add the "clrscr();" after the opening braces....(but not towards the end...as ur result will get wiped out before being 'outputted')
Reply With Quote Quick reply to this message  
Join Date: Mar 2004
Posts: 77
Reputation: infamous is an unknown quantity at this point 
Solved Threads: 2
infamous infamous is offline Offline
Junior Poster in Training

Re: Format a Partition

 
0
  #3
May 14th, 2004
http://msdn.microsoft.com/library/de...c_._wpopen.asp

need to use _popen() to send commands down a pipe to format, ur method will not work.
Reply With Quote Quick reply to this message  
Join Date: May 2004
Posts: 141
Reputation: meabed is on a distinguished road 
Solved Threads: 3
Team Colleague
meabed's Avatar
meabed meabed is offline Offline
Junior Poster

Re: Format a Partition

 
0
  #4
May 16th, 2004
I'm sorry can u write an example
Reply With Quote Quick reply to this message  
Reply

This thread is more than three months old.
Perhaps start a new thread instead?
Message:



Similar Threads
Other Threads in the C Forum
Thread Tools Search this Thread



About Us | Contact Us | Advertise | DaniWeb | Acceptable Use Policy | RSS Feed

©2003 - 2009 DaniWeb® LLC