DEL command line

Status
Not open for further replies.

Poppa Bear

Posts: 228   +8
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!
 

CCT

Posts: 2,610   +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.
 

Poppa Bear

Posts: 228   +8
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.
 

Poppa Bear

Posts: 228   +8
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
 

CCT

Posts: 2,610   +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.
 

Poppa Bear

Posts: 228   +8
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.
 
Status
Not open for further replies.