could some one please clear my doubts in MS DOS?

1)how do i delete a folder?

2)how do i format or erase an entire drive?

3)i want to create a .bat file such that it will read the files in that particular CD in which i copy the .bat file do i do it?

suppose there is a .bat file to read the contents of the CD and a .exe file called 'hi' in the CD.

if i create the .bat file wid a command 'hi.exe',it does not execute 'hi' .

please help!!!

3 Answers

  • Anonymous
    1 decade ago
    Favorite Answer

    ASSOC Displays or modifies file extension associations.

    AT Schedules commands and programs to run on a computer.

    ATTRIB Displays or changes file attributes.

    BREAK Sets or clears extended CTRL+C checking.

    CACLS Displays or modifies access control lists (ACLs) of files.

    CALL Calls one batch program from another.

    CD Displays the name of or changes the current directory.

    CHCP Displays or sets the active code page number.

    CHDIR Displays the name of or changes the current directory.

    CHKDSK Checks a disk and displays a status report.

    CHKNTFS Displays or modifies the checking of disk at boot time.

    CLS Clears the screen.

    CMD Starts a new instance of the Windows command interpreter.

    COLOR Sets the default console foreground and background colors.

    COMP Compares the contents of two files or sets of files.

    COMPACT Displays or alters the compression of files on

    NTFS partitions.

    CONVERT Converts FAT volumes to NTFS. You cannot convert the

    current drive.

    COPY Copies one or more files to another location.

    DATE Displays or sets the date.

    DEL Deletes one or more files.

    DIR Displays a list of files and subdirectories in a directory.

    DISKCOMP Compares the contents of two floppy disks.

    DISKCOPY Copies the contents of one floppy disk to another.

    DOSKEY Edits command lines, recalls Windows commands, and creates macros.

    ECHO Displays messages, or turns command echoing on or off.

    ENDLOCAL Ends localization of environment changes in a batch file.

    ERASE Deletes one or more files.

    EXIT Quits the CMD.EXE program (command interpreter).

    FC Compares two files or sets of files, and displays the differences

    between them.

    FIND Searches for a text string in a file or files.

    FINDSTR Searches for strings in files.

    FOR Runs a specified command for each file in a set of files.

    FORMAT Formats a disk for use with Windows.

    FTYPE Displays or modifies file types used in file extension associations.

    GOTO Directs the Windows command interpreter to a labeled line in a

    batch program.

    GRAFTABL Enables Windows to display an extended character set in graphics


    HELP Provides Help information for Windows commands.

    IF Performs conditional processing in batch programs.

    LABEL Creates, changes, or deletes the volume label of a disk.

    MD Creates a directory.

    MKDIR Creates a directory.

    MODE Configures a system device.

    MORE Displays output one screen at a time.

    MOVE Moves one or more files from one directory to another directory.

    PATH Displays or sets a search path for executable files.

    PAUSE Suspends processing of a batch file and displays a message.

    POPD Restores the previous value of the current directory saved by PUSHD.

    PRINT Prints a text file.

    PROMPT Changes the Windows command prompt.

    PUSHD Saves the current directory then changes it.

    RD Removes a directory.

    RECOVER Recovers readable information from a bad or defective disk.

    REM Records comments (remarks) in batch files or


    REN Renames a file or files.

    RENAME Renames a file or files.

    REPLACE Replaces files.

    RMDIR Removes a directory.

    SET Displays, sets, or removes Windows environment variables.

    SETLOCAL Begins localization of environment changes in a batch file.

    SHIFT Shifts the position of replaceable parameters in batch files.

    SORT Sorts input.

    START Starts a separate window to run a specified program or command.

    SUBST Associates a path with a drive letter.

    TIME Displays or sets the system time.

    TITLE Sets the window title for a CMD.EXE session.

    TREE Graphically displays the directory structure of a drive or path.

    TYPE Displays the contents of a text file.

    VER Displays the Windows version.

    VERIFY Tells Windows whether to verify that your files are written correctly to a disk.

    VOL Displays a disk volume label and serial number.

    XCOPY Copies files and directory trees.

  • 1 decade ago

    1) rd <the directory>

    so to delete c:\test\test you'd type rd c:\test\test and you'd be left with c:\test

    2a) format <drive letter>

    to format d, type format d:

    2b) deltree /Y d:\

    this deletes all of d:\

    *NOTE* if you do not have the deltree command, you are not using MS-DOS 5 or higher. On Windows 2000 and XP there's a command prompt, which is not MS-DOS, but a CLI (command line interface). It is more powerful than MS-DOS. Anyway, to do the same in W2000 or XP command prompt, type del d:\*.* /s /f

    3) Several ways to do this, one is to add the CD ROM drive letter to the path environment variable. In proper ms-dos, you'd add the command 'set PATH=%PATH%;<cdrom drive letter>', so if you're cd rom is d:, the 'set PATH=%PATH%;d:\'. This is in the autoexec.bat. On XP you'd go the control panel, system, advanced and there you'll find a button 'enivronment variables'.

    You can then use the batch file you created.

    Or create a batch file that specifies the path

    @echo off


    or use a parameter

    @echo off


    For the latter, you'd have to type a d:\

  • 1) type rd directory

    2) format c:\ or del *.*

    3) when you start the .bat file you have to set the directory and the drive letter otherwise it will look for the hi.exe in the hard drive and not the cd

    so it would be d:\hi.exe

    something like


    copy *.* c:\{directory}

    haven't had to do DOS in like 10 years but I think that's close to what you'd have to do...

Still have questions? Get your answers by asking now.