Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Can't delete a folder that starts with a space.
Message
From
23/04/2001 15:32:02
 
General information
Forum:
Windows
Category:
Troubleshooting
Miscellaneous
Thread ID:
00495553
Message ID:
00498700
Views:
13
Roi,

Found it!

Here's a cut & paste from the WestWind archives where I posted my fix...

Just to be clear.. I did use the utility on W2K. <g>

***********************************************************************

Rick, All
(sorry if this is a repost)

I finally was able to get that pesky directory deleted! The EXE to do this is on the NT4 Resource Kit CD. It is NOT shipped with W2K since apparently it doesn't allow this to happen..

*cough cough* <g>

Thanks to all for your suggestions and a special thanks to Rick for putting up with me being entirely too cranky with him.

The article at Microsoft is: Q120716

If anyone needs any help please ask me, ok? I'll be more than happy to help.

Here's a copy of that article:

The information in this article applies to:

- Microsoft Windows NT Server versions 3.1, 3.5, 3.51, 4.0
- Microsoft Windows NT Workstation versions 3.1, 3.5, 3.51, 4.0
- Microsoft Windows NT Advanced Server
- Microsoft Windows 2000 Professional
- Microsoft Windows 2000 Server
- Microsoft Windows 2000 Advanced Server
- Microsoft Windows 2000 Datacenter Server
----------------------------------------------------------------------------
---

SUMMARY
=======

Because applications control the policy for creating files in Windows NT or
Windows NT Advanced Server, files sometimes are created with illegal or
reserved
names, such as LPT1 or PRN. It is not obvious how to delete such files using
the
standard user interface. This article explains how.

MORE INFORMATION
================

NOTE: You must be logged on locally to the Windows NT computer to delete
these
files.

If the file was created on a file allocation table (FAT) partition, you may
be
able to delete it under MS-DOS using standard command line utilities (such
as
DEL) with wildcards. For example:

- DEL PR?.*

-or-

- DEL LPT?.*

These commands do not work on an NTFS partition as NTFS supports the POSIX
subsystem and filenames such as PRN are legal under this subsystem. However,
the
operating system assumes the application that created them can also delete
them;
therefore, you can use commands native to the POSIX subsystem.

You can delete (unlink) these files using a simple, native POSIX
application. For
example, the Windows NT Resource Kit includes such a tool, Rm.exe.

NOTE: POSIX commands are case sensitive. Drives and folders are referenced
differently than in MS-DOS.

Usage assumes Rm.exe is either in the path, or the current folder:

rm -d ///slashes>/

For example, to remove a file or folder named COM1 (located at C:\Program
Files\Subdir in this example), type the following command:

rm -d "//C/Program Files/Subdir/COM1"

To remove a folder and its entire contents (C:\Program Files\BadFolder in
this
example), type the following command:

rm -r "//c/program files/badfolder"

Another option is to use a syntax that bypasses the normal reserve-word
checks
altogether. For example, you can possibly delete any file with a command
such
as:

DEL \\.\:\\

For example:

DEL \\.\c:\somedir\aux
Best,


DD

A man is no fool who gives up that which he cannot keep for that which he cannot lose.
Everything I don't understand must be easy!
The difficulty of any task is measured by the capacity of the agent performing the work.
Previous
Next
Reply
Map
View

Click here to load this message in the networking platform