Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations gkittelson on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

copying to DOS floppy

Status
Not open for further replies.

keenanbr

Programmer
Oct 3, 2001
469
IE
How can i verify that i have a valid dos floppy in my unix floppy drive and that my write has succeeded. I would normally format the command (e.g. sprintf(cmd, "doscpy %s A:%s, fl, fl);) and then do a system command; dosstat = system(cmd); if (dosstat != 0) printf("something is wrong with the floppy or there is no floppy in drive or there is no floppy drive or .......etc"). Has anyone got a more elegant way.
 
You can use _chdir(1) to test if A: drive exists, then use the CopyFile() to do the copy.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top