Wednesday 15 February 2012

batch - How to stop confirmation of deletion of file in batch -



batch - How to stop confirmation of deletion of file in batch -

so, have been working on html while decided go batch.i decided download "ms-dos parody" on computer, , noticed while creating new profile. had confirm wanted delete file (a file necessary installation). figure confusing, want delete no confirmation. download here, , here snipet of code also:

:reg cls set /p user=enter desired username: if %user% == todd goto exit if %user% == todd goto exit if %user% == micheal goto exit if %user% == micheal goto exit set /p pass=enter desired password: md "c:\xeondos\users\%user%" md "c:\xeondos\users\%user%\login" md "c:\xeondos\users\%user%\clr" echo %pass% >> c:\xeondos\users\%user%\login\%user%.txt echo 07 >> c:\xeondos\users\%user%\clr\%user%.txt echo type "y". know want to. rd /s c:\xeondos\users\default if not exist c:\xeondos\users\default goto loginmenu1

if help, great. edit: also, wondering zeos inc. thing @ beginning, created 2 years ago , coming names school project. remove in future.

you not show deletion of file. show deletion of directory.

generally, adding

>nul

to command suppress messages generated command

2>nul

to command suppress error messages generated command

and automatically come in y, can use

echo y|your_command

although case, may wish examine documentation, may reveal other options.

again, in general prompt,

commandname /?

will show (sometimes terse) documentation.

commandname /?|more

will allow read documentation line-by-line or screen-by-screen.

or

commandname /? >filename

will set help file named filename read whatever editor or word-processor takes fancy.

eg.

rd /?

will show documentation rd (remove directory)

del /?

ditto del (delete file = erase file)

batch-file

No comments:

Post a Comment