Thursday, December 4, 2008

DirectoryName or FileName with a space at end

Refer www.1ask2.com

Cannot delete files or directories when there are spaces at end of the name.
How do you create a file name with a space at the end?

C:\>mkdir c:\test
C:\>cd test
C:\test>copy con "file://?/c:/test/my.txt "
Hello
Hello
^Z

1 file(s) copied.
C:\test>dir


How to delete it?
Could Not Find C:\test\my.txt

C:\test>del "file://?/c:/test/my.txt "
C:\test>