Path: utzoo!attcan!uunet!ns-mx!iowasp.physics.uiowa.edu!ceres.physics.uiowa.edu!zaphod.mps.ohio-state.edu!mips!prls!pyramid!cbmvax!cbmehq!cbmfra!swinjm!forgeas From: forgeas@swinjm.UUCP (Jean-Michel Forgeas) Newsgroups: comp.sys.amiga.tech Subject: Re: reformat of hard drives Message-ID: Date: 4 Sep 90 12:43:31 GMT References: <13618@sun.udel.edu> <28569@nigel.ee.udel.edu> Lines: 36 >In article <13618@sun.udel.edu> jtmorgan@sun.udel.edu (James Morgan) writes: >>Is there any thing that can be done to put some sort of >>prompt in the way of a person that is trying to reformat >>the hard drive of an amiga? If you Execute() the Format command with stdin redirected to NIL:, it does not ask "insert disk to be initia........" before start. So you could make a program which Execute() Format after your verifications: main( argc, argv ) { .... find volume name with argv .... and rebuild the entire arg string if (volume == harddrive || what_you_want) { printf( "Do you really want... ?\n" ); scanf( ....., answer ); if (answer == no) return; } else{ if (nil = Open( "NIL:",...)) { sprintf( tmpbuf, "SYS:System/Format %ls\n", entire_arg_string ); Execute( tmpbuf, nil, stdout ); Close( nil ); } } } -- \___/ Jean-Michel Forgeas \-/ cbmvax!cbmehq!cbmfra!swinjm!forgeas | The Software Winery -^- And, where is the universe ?