TechSpot

DEL command line

By Poppa Bear
Oct 24, 2008
  1. If I have created a new folder on my C: file and named it: "Odd Bods" for example.

    Using the DEL Command Prompt in XP, what is the exact syntax to forcibly delete it?

    I have tried by opening the Command Prompt and typing in "CD \" then enter to bring up the cursor "C:\>". Then I have typed: "Del /F Odd Bods" and "enter". The message then comes up; "Are you sure? y/n". I then type: "y" and enter, but the folder is not deleted.

    Help!
     
  2. CCT

    CCT TS Evangelist Posts: 2,653   +6

    If folder is on desktop:

    Start
    Run
    Enter 'cmd /k' (no quotes)
    Enter 'cd\' (will get you the C:\ prompt)
    Enter 'cd\Documents and Settings\{your user name}\Desktop'
    Enter 'dir /w'


    If you can see the item, Enter 'erase [filename]'

    del [filename] also works - for a directory (maybe folders too) RD [directory] works


    edit: if you do the Start, run, cmd /k thing then type 'help' you'll get a list of the limited MSDOS commands remaining in the poor excuse for DOS XP supports.

    For details on those, type, for example, 'help del' and you'll get the possible options.
     
  3. Poppa Bear

    Poppa Bear TS Enthusiast Topic Starter Posts: 237   +7

    No success

    Hi CCT

    I did exactly as you suggested and it came up with the message: "Are you sure <y/n>?" . I typed "Y" and enter but the folder was still there.
     
  4. CCT

    CCT TS Evangelist Posts: 2,653   +6

    Checked it out -a folder is, in effect, a directory - use rd [folder name]
     
  5. Poppa Bear

    Poppa Bear TS Enthusiast Topic Starter Posts: 237   +7

    Tried the rd [folder name] and got the same result. That is, it recognized the command and the folder and gave me the response: "Are you sure <y/n>?". Once again I typed "Y" and enter but the folder was still there on the desktop.

    Maybe it's my OS? I'm using XP Pro with SP3 & all the latest updates for all programs.

    Apologies CCT. I had mis-read your message and was using the wrong syntax. My final command read: del rd (name of the folder)... ie the name of the folder without the brackets. It should have simply been: rd (name of the folder)... . I complicated it unnecessarily.

    At last success. Is there a list of the different commands to delete different types of files, folders, etc. For example, what is the command to delete a link? Cheers PB
     
  6. CCT

    CCT TS Evangelist Posts: 2,653   +6

    'At last success. Is there a list of the different commands to delete different types of files, folders, etc. For example, what is the command to delete a link? Cheers PB'

    Not unless someone has created one - by trial and error you will find what works - the shortcuts (lnk's) get deleted with del.
     
  7. kimsland

    kimsland Ex-TechSpotter Posts: 14,524

  8. Poppa Bear

    Poppa Bear TS Enthusiast Topic Starter Posts: 237   +7

    Link to commands

    Many thanks Kimsland,

    Have opened the link to the list of commands and have saved and printed it out. PB :wave:

    ps How come I can now add a pic like the smiley face? Have I reached some sort of quota with posts? Must say I'm really enjoying being in Techspot. Have never been into forums before.... wish I'd started earlier.
     
  9. kimsland

    kimsland Ex-TechSpotter Posts: 14,524

    Pretty sure you can add Pics from post count 5
    But someone told me it was 15

    So now I'm confused :confused:
     
Topic Status:
Not open for further replies.

Similar Topics

Add New Comment

You need to be a member to leave a comment. Join thousands of tech enthusiasts and participate.
TechSpot Account You may also...