Tech Support > Operating Systems > Windows 2000 > Can not delete files/ folders illegal names.
Can not delete files/ folders illegal names.
Posted by Pegasus \(MVP\) on August 23rd, 2003


Here is how you can delete c:\LPT1 -

del \\.\c:\LPT1

Apply the same syntax to other illegal file & folder names.
"Betti" <Betti@nospam.com> wrote in message news:OFPlSAYaDHA.1580@tk2msftngp13.phx.gbl...
Someone put files/directories on a computer with illegal names, hidden characters or names like com1, lpt1 etc.
How can I remove these?
I tried renaming but can not.

Thanks

Posted by George Hester on August 23rd, 2003


Make sure you get the names with leading spaces exactly. Do that in Windows
Explorer. Say you had this file:

;;;............;;;

So how many spaces do you see here? In Windows Explorer select the file
right-click and choose rename. Of course you cannot rename it but that is
not the point. You can hit the right key arrow and then count back with the
left key arrow. Now you will know the number of spaces. And I believe you
need to enclose the name in quotes.

--
George Hester
__________________________________
"Pegasus (MVP)" <I.can@fly.com> wrote in message
news:eq#lZIYaDHA.2308@TK2MSFTNGP12.phx.gbl...
Here is how you can delete c:\LPT1 -

del \\.\c:\LPT1

Apply the same syntax to other illegal file & folder names.
"Betti" <Betti@nospam.com> wrote in message
news:OFPlSAYaDHA.1580@tk2msftngp13.phx.gbl...
Someone put files/directories on a computer with illegal names, hidden
characters or names like com1, lpt1 etc.
How can I remove these?
I tried renaming but can not.

Thanks


Posted by George Hester on August 23rd, 2003


And oh yeah change del to rd

--
George Hester
__________________________________
"Pegasus (MVP)" <I.can@fly.com> wrote in message
news:eq#lZIYaDHA.2308@TK2MSFTNGP12.phx.gbl...
Here is how you can delete c:\LPT1 -

del \\.\c:\LPT1

Apply the same syntax to other illegal file & folder names.
"Betti" <Betti@nospam.com> wrote in message
news:OFPlSAYaDHA.1580@tk2msftngp13.phx.gbl...
Someone put files/directories on a computer with illegal names, hidden
characters or names like com1, lpt1 etc.
How can I remove these?
I tried renaming but can not.

Thanks



Similar Posts