Un-nesting Files

S

Sid Elbow

Not sure how to explain this but:

I have a directory tree consisting of a set of sub-directories each
containing an individual file.

That is, I have <rootdir> containing <dir1>, <dir2>, dir<3> ... etc
<dir1> contains <file1>
<dir2> contains <file2>
<dir3> contains <file3> ... etc

(fwiw the directories are named the same as the files they contain).

Does any one know of a utility (or batch file) that will allow me to
easily un-nest these files (that is pull them out of their individual
directories up to the <rootdir>)?


[If it were just the one tree I'd bite the bullet and could probably do
it manually in not much more time than it takes to write. However, I
have multiple instances of such trees].
 
P

Pegasus \(MVP\)

Sid Elbow said:
Not sure how to explain this but:

I have a directory tree consisting of a set of sub-directories each
containing an individual file.

That is, I have <rootdir> containing <dir1>, <dir2>, dir<3> ... etc
<dir1> contains <file1>
<dir2> contains <file2>
<dir3> contains <file3> ... etc

(fwiw the directories are named the same as the files they contain).

Does any one know of a utility (or batch file) that will allow me to
easily un-nest these files (that is pull them out of their individual
directories up to the <rootdir>)?


[If it were just the one tree I'd bite the bullet and could probably do it
manually in not much more time than it takes to write. However, I have
multiple instances of such trees].

xxcopy.exe can do this. They call it "Flatten a directory tree".
You can download it from a number of sites.
 
S

Sid Elbow

Pegasus said:
xxcopy.exe can do this. They call it "Flatten a directory tree".
You can download it from a number of sites.

OK, found it. I'll give it a whirl.

Thanks, Pegasus.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top