Computer Hope

Microsoft => Microsoft DOS => Topic started by: marco on November 03, 2004, 05:05:07 AM

Title: deleting files with spaces in between the name
Post by: marco on November 03, 2004, 05:05:07 AM
hi, i have a problem

suppose i have a file called " text document.txt"
how do i delete from dos.
the problem is the space between text and document.

i have tried del text\ document.txt ( as in unix ) but it doesn`t work

any help?

thanks in advance
Title: Re: deleting files with spaces in between the name
Post by: 2k dummy on November 03, 2004, 07:48:13 AM
Include <path><filename> in quotation marks or use the DOS 8.3 format and substitute a question mark for the space.
Title: Re: deleting files with spaces in between the name
Post by: MalikTous on November 03, 2004, 03:58:23 PM
del "text document.txt"
del textdo~1.txt


both work.

If I had a short name file like s t.txt (s, space, t, dot, txt) I could use

del s%20t.txt

but the name still has to fit in the 8.3 format unless you use "doublequotes".