Dos File Delete Help

Discussion in 'QnA (read only)' started by satyamy, Oct 3, 2006.

Thread Status:
Not open for further replies.
  1. satyamy

    satyamy Alive Again...

    Joined:
    May 20, 2005
    Messages:
    1,665
    Likes Received:
    1
    Trophy Points:
    0
    Location:
    Mumbai
    How can i delete a folder named "abcd" & all its sub-directories & files using dos command
    I tried
    D:\abcd /f/q
    but it only delete file which is present in abcd
    & not all folder in abcd & files in its sub-directories
    Pls help.............
     
  2. Tech Geek

    Tech Geek Wise Old Owl

    Joined:
    Sep 21, 2006
    Messages:
    1,602
    Likes Received:
    18
    Trophy Points:
    0
    Location:
    Cyber Hell
    Go to safe mode and delete the files which u don't want[MANUALLY]
     
  3. OP
    OP
    satyamy

    satyamy Alive Again...

    Joined:
    May 20, 2005
    Messages:
    1,665
    Likes Received:
    1
    Trophy Points:
    0
    Location:
    Mumbai
    thanks for this suggestion man
    i know this
    but i need perfect dos command to delete directory named abcd in my D: drive
    can anyone know the correct answer
     
  4. Tech Geek

    Tech Geek Wise Old Owl

    Joined:
    Sep 21, 2006
    Messages:
    1,602
    Likes Received:
    18
    Trophy Points:
    0
    Location:
    Cyber Hell
    This what u want i believe
    Deletes files.
    command is:

    1. del filename or
    2. erase filename

    To delete files in Quiet mode
    del /Q filename

    :rolleyes:
     
  5. OP
    OP
    satyamy

    satyamy Alive Again...

    Joined:
    May 20, 2005
    Messages:
    1,665
    Likes Received:
    1
    Trophy Points:
    0
    Location:
    Mumbai
    no man u did'nt understand the question
    m not talking abt single file
    but abt whole directory & its sub-directory & all files inside it
     
  6. Tech Geek

    Tech Geek Wise Old Owl

    Joined:
    Sep 21, 2006
    Messages:
    1,602
    Likes Received:
    18
    Trophy Points:
    0
    Location:
    Cyber Hell
    This should work out

    The Windows XP DOS command RMDIR removes a directory from your system and has the following syntax:

    RMDIR directory_name

    For example, to remove directory C:\BLAH, enter:

    RMDIR C:\BLAH
     
  7. OP
    OP
    satyamy

    satyamy Alive Again...

    Joined:
    May 20, 2005
    Messages:
    1,665
    Likes Received:
    1
    Trophy Points:
    0
    Location:
    Mumbai
    O yes...............
    This is the Perfect one
    Thanks
    Thanks a lot
    frm where did u got this command
     
  8. Vishal Gupta

    Vishal Gupta Microsoft MVP

    Joined:
    Jul 28, 2005
    Messages:
    5,173
    Likes Received:
    121
    Trophy Points:
    0
    Location:
    AskVG.com
    Type Help and press <Enter> :D
     
  9. aadipa

    aadipa New Member

    Joined:
    Feb 12, 2004
    Messages:
    997
    Likes Received:
    2
    Trophy Points:
    0
    Location:
    Palghar, Mumbai
    You will need /s option too

    Code:
    rmdir /s <dir name>
    This is used to delete dir tree.
     
  10. it_waaznt_me

    it_waaznt_me Coming back to life ..

    Joined:
    Nov 30, 2003
    Messages:
    2,023
    Likes Received:
    10
    Trophy Points:
    38
    Location:
    A bit closer to heaven
    To delete a directory and its subdirectories, you use the command Deltree.

    Deltree /y foldername

    Gone
     
  11. aadipa

    aadipa New Member

    Joined:
    Feb 12, 2004
    Messages:
    997
    Likes Received:
    2
    Trophy Points:
    0
    Location:
    Palghar, Mumbai
    @batty

    deltree was there in older dos versions. Win2K and WinXP don't have deltree command.

    so rmdir is the command to use.
     
  12. OP
    OP
    satyamy

    satyamy Alive Again...

    Joined:
    May 20, 2005
    Messages:
    1,665
    Likes Received:
    1
    Trophy Points:
    0
    Location:
    Mumbai
    thanks a Lot Friends
    This Solved my Problem
     
  13. it_waaznt_me

    it_waaznt_me Coming back to life ..

    Joined:
    Nov 30, 2003
    Messages:
    2,023
    Likes Received:
    10
    Trophy Points:
    38
    Location:
    A bit closer to heaven
    Bahahhaa .. I just checked if deltree was there or not .. It was there so I didnt check it to see if works or not .. . Duh .. shouldve done .. :p
     
  14. DukeNukem

    DukeNukem Come get Some

    Joined:
    Aug 28, 2005
    Messages:
    417
    Likes Received:
    2
    Trophy Points:
    0
    Location:
    Home Sweet Home
    Follow this http://www.fsref.com/pr/dosxp.shtml for more action
    or

    APPEND Allows programs to open data files as if they were in the current directory
    ARP Displays and modifies the IP-to-Physical address ARP translation tables.
    ASSOC Displays or modifies file extension associations.
    AT Schedules commands and programs to run on a computer.
    ATMADM Windows ATM Call Manager Statistics.
    ATTRIB Displays or changes file attributes.
    BOOTCFG Configures the boot.ini file.
    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.
    CIPHER Displays or alters the encryption of directories [files] on NTFS partitions.
    CLS Clears the screen.
    CMD Starts a new instance of the Windows command interpreter.
    CMSTP Installs or removes a Connection Manager service profiles.
    COLOR Sets the default console foreground and background colors.
    COMMAND Command Interpreter
    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.
    COPY Copies one or more files to another location.
    CSCRIPT Microsoft Windows Script Host
    DATE Displays or sets the date.
    DEBUG A program testing and editing tool.
    DEFRAG Disk Defragmenter.
    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.
    DISKPART Disk Partition Utility.
    DOSKEY Edits command lines, recalls Windows commands, and creates macros.
    DRIVERQUERY Enables an administrator to enumerate and display the list of
    installed device drivers as well as their properties.
    ECHO Displays messages, or turns command echoing on or off.
    EDIT MS-DOS Editor
    EDLIN A line-oriented text editor.
    ENDLOCAL Ends localization of environment changes in a batch file.
    ERASE Deletes one or more files.
    EVENTCREATE Create a custom event ID and message in a specified event log.
    EVENTTRIGGERS This command-line tool enables an administrator to display and
    configure "Event Triggers" on local or remote system.
    EXIT Quits the CMD.EXE program (command interpreter).
    EXPAND Expands one or more compressed files.
    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.
    FTP Transfers files to and from a computer running an FTP server service
    FTYPE Displays or modifies file types used in file extension associations.
    GETMAC This command line tool enables an administrator to display the MAC
    address for one or more network adapters on a system.
    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
    mode.
    GPRESULT This command line tool displays the Resultant Set of Policy (RSoP)
    for a target user and computer.
    GPUPDATE Refreshes Group Policies settings.
    HELP Provides Help information for Windows commands.
    IF Performs conditional processing in batch programs.
    IPCONFIG IP Configuration.
    KB16 Configures a keyboard for a specific language.
    LABEL Creates, changes, or deletes the volume label of a disk.
    LOADFIX Loads a program above the first 64K of memory, and runs the program.
    LODCTR Updates Performance Monitor counter names and explain text for an extensible counter.
    LOGMAN Logman manages the "Performance Logs and Alerts" service for creating and
    managing Event Trace Session logs and Performance logs.
    LPR Sends a print job to a network printer.
    MD Creates a directory.
    MEM Displays the amount of used and free memory in your system.
    MKDIR Creates a directory.
    MODE Configures a system device.
    MORE Displays output one screen at a time.
    MOUNTVOL Creates, deletes, or lists a volume mount point.
    MOVE Moves one or more files from one directory to another directory.
    OPENFILESEnables an administrator to list or disconnect files and folders
    that have been opened on a system.
    PATH Displays or sets a search path for executable files.
    PAUSE Suspends processing of a batch file and displays a message.
    PENTNT Reports on whether local computer exhibits Intel(tm) Pentium

    Floating Point Division Error
    PING Ping a network connection
    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.
    RELOG Relog creates new performance logs from data in existing performance logs by
    changing the sampling rate and/or converting the file format. Supports all
    performance log formats, including Windows NT 4.0 compressed logs.
    REM Records comments (remarks) in batch files or CONFIG.SYS.
    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.
    TFTP Transfers files to and from a remote computer running the TFTP service.
    TIME Displays or sets the system time.
    TITLE Sets the window title for a CMD.EXE session.
    TRACERPT Processes binary Event Trace Session log files or real-time streams
    TREE Graphically displays the directory structure of a drive or path.
    TYPE Displays the contents of a text file.
    TYPEPERF Writes performance data to the command window or to a log 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.
     
Thread Status:
Not open for further replies.

Share This Page