Sign in with
Sign up | Sign in
Your question
Closed

how to delete infinitely deep folder structure?

Last response: in Windows 2000/NT
Share
Anonymous
September 23, 2004 11:13:03 AM

Archived from groups: microsoft.public.win2000.advanced_server (More info?)

Hi,

One of my collegues was building a complex folder structure. One of the
tools he used to do this was robocopy in order to quickly create folders with
the same rights.

Somehow something went wrong. We now have one folder structure that seems to
be infinitely deep. Using the subst command we've traced the folder
partially. We gave up around the 750 folder level.

So, does anyone have any ideas how to get rid of this $%&!! structure?

I've tried some old tools, I've tried the posix commands described in KB
120716. I've even tried a cmd file that crawls down into the folder structure
and then tries to delete it folder by folder.
All somehow seem to choke on the fact that the folder structure is so deep.

I'd rather not scrap the volume since it contains a lot of data.

Any suggestion's would be appriciated.
--
Regards,

Jeroen Wijnands
Anonymous
September 23, 2004 4:42:01 PM

Archived from groups: microsoft.public.win2000.advanced_server (More info?)

RMDIR [/S] [/Q] [drive:]path
RD [/S] [/Q] [drive:]path

/S Removes all directories and files in the specified directory
in addition to the directory itself. Used to remove a directory
tree.

/Q Quiet mode, do not ask if ok to remove a directory tree with /S

Lee

"Jeroen Wijnands @ work" <jeroen.wijnands@online.nospam> wrote in message
news:BB0BD6EF-41BB-41E7-BFA2-4C685B312EE5@microsoft.com...
> Hi,
>
> One of my collegues was building a complex folder structure. One of the
> tools he used to do this was robocopy in order to quickly create folders
with
> the same rights.
>
> Somehow something went wrong. We now have one folder structure that seems
to
> be infinitely deep. Using the subst command we've traced the folder
> partially. We gave up around the 750 folder level.
>
> So, does anyone have any ideas how to get rid of this $%&!! structure?
>
> I've tried some old tools, I've tried the posix commands described in KB
> 120716. I've even tried a cmd file that crawls down into the folder
structure
> and then tries to delete it folder by folder.
> All somehow seem to choke on the fact that the folder structure is so
deep.
>
> I'd rather not scrap the volume since it contains a lot of data.
>
> Any suggestion's would be appriciated.
> --
> Regards,
>
> Jeroen Wijnands
Anonymous
September 24, 2004 3:57:02 AM

Archived from groups: microsoft.public.win2000.advanced_server (More info?)

"Leon E. Webster, MCSE" wrote:

> RMDIR [/S] [/Q] [drive:]path
> RD [/S] [/Q] [drive:]path
>
> /S Removes all directories and files in the specified directory
> in addition to the directory itself. Used to remove a directory
> tree.
>
> /Q Quiet mode, do not ask if ok to remove a directory tree with /S
>
> Lee
Well Lee,

I may not sign with my mcse title but that does not mean I didn't try the
basic tools.

This does not work, gives me "directory not empty" error.

Any other ideas?

>
> "Jeroen Wijnands @ work" <jeroen.wijnands@online.nospam> wrote in message
> news:BB0BD6EF-41BB-41E7-BFA2-4C685B312EE5@microsoft.com...
> > Hi,
> >
> > One of my collegues was building a complex folder structure. One of the
> > tools he used to do this was robocopy in order to quickly create folders
> with
> > the same rights.
> >
> > Somehow something went wrong. We now have one folder structure that seems
> to
> > be infinitely deep. Using the subst command we've traced the folder
> > partially. We gave up around the 750 folder level.
> >
> > So, does anyone have any ideas how to get rid of this $%&!! structure?
> >
> > I've tried some old tools, I've tried the posix commands described in KB
> > 120716. I've even tried a cmd file that crawls down into the folder
> structure
> > and then tries to delete it folder by folder.
> > All somehow seem to choke on the fact that the folder structure is so
> deep.
> >
> > I'd rather not scrap the volume since it contains a lot of data.
> >
> > Any suggestion's would be appriciated.
> > --
> > Regards,
> >
> > Jeroen Wijnands
>
>
>
Related resources
Anonymous
September 24, 2004 8:49:45 PM

Archived from groups: microsoft.public.win2000.advanced_server (More info?)

Sorrrry!

Lee

"Jeroen Wijnands @ work" <jeroen.wijnands@online.nospam> wrote in message
news:241D0A1C-5C19-4463-B58F-44A4DA1E23BD@microsoft.com...
>
>
> "Leon E. Webster, MCSE" wrote:
>
> > RMDIR [/S] [/Q] [drive:]path
> > RD [/S] [/Q] [drive:]path
> >
> > /S Removes all directories and files in the specified directory
> > in addition to the directory itself. Used to remove a
directory
> > tree.
> >
> > /Q Quiet mode, do not ask if ok to remove a directory tree with
/S
> >
> > Lee
> Well Lee,
>
> I may not sign with my mcse title but that does not mean I didn't try the
> basic tools.
>
> This does not work, gives me "directory not empty" error.
>
> Any other ideas?
>
> >
> > "Jeroen Wijnands @ work" <jeroen.wijnands@online.nospam> wrote in
message
> > news:BB0BD6EF-41BB-41E7-BFA2-4C685B312EE5@microsoft.com...
> > > Hi,
> > >
> > > One of my collegues was building a complex folder structure. One of
the
> > > tools he used to do this was robocopy in order to quickly create
folders
> > with
> > > the same rights.
> > >
> > > Somehow something went wrong. We now have one folder structure that
seems
> > to
> > > be infinitely deep. Using the subst command we've traced the folder
> > > partially. We gave up around the 750 folder level.
> > >
> > > So, does anyone have any ideas how to get rid of this $%&!! structure?
> > >
> > > I've tried some old tools, I've tried the posix commands described in
KB
> > > 120716. I've even tried a cmd file that crawls down into the folder
> > structure
> > > and then tries to delete it folder by folder.
> > > All somehow seem to choke on the fact that the folder structure is so
> > deep.
> > >
> > > I'd rather not scrap the volume since it contains a lot of data.
> > >
> > > Any suggestion's would be appriciated.
> > > --
> > > Regards,
> > >
> > > Jeroen Wijnands
> >
> >
> >
Anonymous
September 27, 2004 5:23:45 AM

Archived from groups: microsoft.public.win2000.advanced_server (More info?)

"Jeroen Wijnands @ work" <jeroen.wijnands@online.nospam> wrote in message news:<BB0BD6EF-41BB-41E7-BFA2-4C685B312EE5@microsoft.com>...
> Hi,
>
> One of my collegues was building a complex folder structure. One of the
> tools he used to do this was robocopy in order to quickly create folders with
> the same rights.
>
> Somehow something went wrong. We now have one folder structure that seems to
> be infinitely deep. Using the subst command we've traced the folder
> partially. We gave up around the 750 folder level.
>
> So, does anyone have any ideas how to get rid of this $%&!! structure?
>
> I've tried some old tools, I've tried the posix commands described in KB
> 120716. I've even tried a cmd file that crawls down into the folder structure
> and then tries to delete it folder by folder.
> All somehow seem to choke on the fact that the folder structure is so deep.
>
> I'd rather not scrap the volume since it contains a lot of data.
>
> Any suggestion's would be appriciated.

Finally figured it out.

1. at the top level of the problem folder create another dummy folder
2. type robocopy dummy_folder problem_folder /purge
3. sit back and sip some coffee
4. problem solved.

Jeroen
October 6, 2004 3:08:46 AM

Archived from groups: microsoft.public.win2000.advanced_server (More info?)

Ok...got an idea...add another drive to the system and mount its free space
to a folder....move the problem structure to the folder and then dismount
the free space...the folder's data is lost is space.

Lee



"Leon E. Webster, MCSE" <leweb2000@hotmail.com> wrote in message
news:elB%23pBooEHA.2300@TK2MSFTNGP10.phx.gbl...
> Sorrrry!
>
> Lee
>
> "Jeroen Wijnands @ work" <jeroen.wijnands@online.nospam> wrote in message
> news:241D0A1C-5C19-4463-B58F-44A4DA1E23BD@microsoft.com...
> >
> >
> > "Leon E. Webster, MCSE" wrote:
> >
> > > RMDIR [/S] [/Q] [drive:]path
> > > RD [/S] [/Q] [drive:]path
> > >
> > > /S Removes all directories and files in the specified
directory
> > > in addition to the directory itself. Used to remove a
> directory
> > > tree.
> > >
> > > /Q Quiet mode, do not ask if ok to remove a directory tree
with
> /S
> > >
> > > Lee
> > Well Lee,
> >
> > I may not sign with my mcse title but that does not mean I didn't try
the
> > basic tools.
> >
> > This does not work, gives me "directory not empty" error.
> >
> > Any other ideas?
> >
> > >
> > > "Jeroen Wijnands @ work" <jeroen.wijnands@online.nospam> wrote in
> message
> > > news:BB0BD6EF-41BB-41E7-BFA2-4C685B312EE5@microsoft.com...
> > > > Hi,
> > > >
> > > > One of my collegues was building a complex folder structure. One of
> the
> > > > tools he used to do this was robocopy in order to quickly create
> folders
> > > with
> > > > the same rights.
> > > >
> > > > Somehow something went wrong. We now have one folder structure that
> seems
> > > to
> > > > be infinitely deep. Using the subst command we've traced the folder
> > > > partially. We gave up around the 750 folder level.
> > > >
> > > > So, does anyone have any ideas how to get rid of this $%&!!
structure?
> > > >
> > > > I've tried some old tools, I've tried the posix commands described
in
> KB
> > > > 120716. I've even tried a cmd file that crawls down into the folder
> > > structure
> > > > and then tries to delete it folder by folder.
> > > > All somehow seem to choke on the fact that the folder structure is
so
> > > deep.
> > > >
> > > > I'd rather not scrap the volume since it contains a lot of data.
> > > >
> > > > Any suggestion's would be appriciated.
> > > > --
> > > > Regards,
> > > >
> > > > Jeroen Wijnands
> > >
> > >
> > >
>
>
August 20, 2009 8:38:37 PM

Hai I'm not really a windows server type of guy, but I got the exact same problem, apart from I somehow hot the folder structure on a nas which I can reach from client computers.
The nas has no way by itself to access the files by webinterface, only by network.
I've mounted the share to windows clients and tried numerous tools to try and delete it. no avail.
I tried with Linux clients (CLI based) to rm -Rvf trouble_folder.
The only way I can think of is to copy all files over to another share on the nas and the remove the share like in lee's post.
Regards,

Richard
January 7, 2012 10:00:38 PM

And here we are, in 2012, years later, and yours truly suffered the same problem under Windows 7 Pro and went googling for a solution. Your simple solution worked. Robocopy listed about 2300+ extra folders! For some reason, though, it stopped after a while and left me with a folder structure about a hundred levels deep. So I ran it again with the same parameters. It would purge some more folders and files and then it would stop again. I kept running it again until the entire structure went to oblivion.

In case anyone is curious about how I ended up with a folder structure like this, here's the story. It was awhile ago (2010), so I don't remember what happened exactly, but I remember I was trying to create a new project in eclipse (the programming IDE) and was trying to do something with workspaces (creating a new one in some existing directory, perhaps). Eclipse got stuck (probably in an infinite loop of some sort.) I think I had to terminate it manually from Task Manager. It was after this event that I discovered the "interesting" folder hierarchy, where each folder had the same name as its parent.

I tried deleting it using the normal GUI interface which failed, of course. Before I found this thread, I ran into a Microsoft Support article (kb 320081) and tried some of the suggestions there. It worked only to a certain level, so the folder hierarchy may have been much deeper.

Anyway, thanks for helping a computer user from the future! :) 

Quote:
Archived from groups: microsoft.public.win2000.advanced_server (More info?)

"Jeroen Wijnands @ work" <jeroen.wijnands@online.nospam> wrote in message news:<BB0BD6EF-41BB-41E7-BFA2-4C685B312EE5@microsoft.com>...
> Hi,
>
> One of my collegues was building a complex folder structure. One of the
> tools he used to do this was robocopy in order to quickly create folders with
> the same rights.
>
> Somehow something went wrong. We now have one folder structure that seems to
> be infinitely deep. Using the subst command we've traced the folder
> partially. We gave up around the 750 folder level.
>
> So, does anyone have any ideas how to get rid of this $%&!! structure?
>
> I've tried some old tools, I've tried the posix commands described in KB
> 120716. I've even tried a cmd file that crawls down into the folder structure
> and then tries to delete it folder by folder.
> All somehow seem to choke on the fact that the folder structure is so deep.
>
> I'd rather not scrap the volume since it contains a lot of data.
>
> Any suggestion's would be appriciated.

Finally figured it out.

1. at the top level of the problem folder create another dummy folder
2. type robocopy dummy_folder problem_folder /purge
3. sit back and sip some coffee
4. problem solved.

Jeroen

March 27, 2012 12:13:58 PM

Quote:

Finally figured it out.

1. at the top level of the problem folder create another dummy folder
2. type robocopy dummy_folder problem_folder /purge
3. sit back and sip some coffee
4. problem solved.

Jeroen
[/quotemsg]

Thanks Jeroen!

Robocopy did exactly the same thing to me, and I'm in the final stages of building an image. I was very worried until I came across your post, and I laughed when I read how plainly obvious the solution was. The purge has lasted 10 minutes so far, so I might get another coffee.

Many thanks for getting me out of a jam!
Damon

Update...
Results of the purge are:
Dirs : 3339
Files : 8536
!