
03-11-2010
|
|
|
|
Re: How to delete deep directory hierarchy
Mário wrote:
> Hello,
>
> I have a deep directory hierarchy (which was created programmatically)
> having a too long path name such that I cannot delete it from explorer
> or via DOS.
> I tried,
>
> rmdir /S /Q dir
>
> but it does not work.
>
> Does someone know how to delete a directory structure with too much
> deep descendent entries?
Map (over a network) or substitute (locally) the long directory path to
a drive and then delete the files from the mapped or substituted drive.
Locally, at a command prompt:
subst x: c:\long path
now you can delete file from the X drive, when done delete the
substituted drive:
subst x: /d
(Map over a network with the net use command)
Tip: You can grab folders from Windows Explorer and then drag and drop
them to the command prompt, or you can Copy & Paste to the Command line.
To substitute the current directory you can use a period:
subst x: .
will substitute the current directory to drive X.
John
|