views:

31

answers:

2

I'm guessing this is a basic DOS question, its with the del command. All I want to do is delete a file.

C:\Documents and Settings\matthewe\Desktop\testfolder>del C:\Documents and Settings\matthewe\Desktop\testfolder\test.pdf The system cannot find the path specified.

I can guarantee that test.pdf exists, and the fact I've been able to cd to the correct folder shows it exists. So why the error?

+1  A: 

Try to put your path inside double quote, DOS don't like long path with space inside:

del "C:\Documents and Settings\matthewe\Desktop\testfolder\test.pdf"
Alois Cochard
Ah excellent! Thank you very much. Now that you've answered I remember doing this in the past - oh well. Graham also answered correct but I'll give you the points since you have less :-)
m.edmondson
+1  A: 

use quotes - del "C:\Documents and Settings\matthewe\Desktop\testfolder\test.pdf"

Graham Clark