ricardo.l said:
I have a folder (L1) with a large number of folders within (L2).
Each subfolder just contains a subfolder (L3) with some files.
I need to move all the files one level up so basically they would
end up within L2, together with empty L3.
I have considered a batch file with for statement, but I don't know
how to move files without navigating down to each L3 folder, which
have unique name. And I think it works only with single command...
Any idea or workaround to perform the task would help.
If you want to do it with a command you can use XCOPY. If you want
to do it manually just use explorer. Click on the folder LI and you
should have folder L2 and L3 in site. Go to L3 and left click on
any one file then press CTRL+A which selects all the files in L3.
Now hold the left button down on any file and mouse drag them over
to L2. You are done.
ricardo.l said:
As the number of folders is large as I said It is not feasible
manually. I'll check out xcopy...
No matter how large the folder is, when you click on any file in
the folder and press "CTRL+A" it will capture all the files and sub
folders and then all you have to do is paste them into the folder
you want. This is fast.
I agree with Ricardo. It's very easy to move 100's of folders and
files up one level using, for example, <Cntl A>, <Cntl X>, Move to
the destination L1 folder, <Cntl V>. Something I do regularly
He does not get the function of how the CTRL+A works yet. Yes you
can use a batch file with XCOPY and move from folder to folder if
you want to do all that work but look into the CTRL+A it will move
all your file from one folder to the other fast. It does not care
how large the files are or if you have 1000 files. It will move or
copy them, fast.
Perhaps if everyone read the original posting and took the time to
understand it (comprehension, not just making up what you believe
the problem is.)
From the original:
"... a folder (L1) with a large number of folders within (L2).
Each subfolder just contains a subfolder (L3) with some files.
.... need to move all the files one level up so basically they
would end up within L2, together with empty L3 ..."
The directory structure looks like this:
\Level1
\Level2
\Level3
There is only *one* Level1 folder.
There may be 100's of Level2 folders and each of the Level2 folders contain
one each Level3 folder.
So something like this:
\MainFolder\SubFolder(1)\Sub-SubFolder(1)
\MainFolder\SubFolder(2)\Sub-SubFolder(2)
\MainFolder\SubFolder(3)\Sub-SubFolder(3)
\MainFolder\SubFolder(4)\Sub-SubFolder(4)
\MainFolder\SubFolder(5)\Sub-SubFolder(5)
....
\MainFolder\SubFolder(995)\Sub-SubFolder(995)
\MainFolder\SubFolder(996)\Sub-SubFolder(996)
\MainFolder\SubFolder(997)\Sub-SubFolder(997)
\MainFolder\SubFolder(998)\Sub-SubFolder(998)
\MainFolder\SubFolder(999)\Sub-SubFolder(999)
Now - what the original poster would like to do is move all of the Level3
folders to Level2. Since there are many unique Level2 folders containing
each a single Level3 folder with files in it, dragging and dropping would
mean opening each unique Level2 folder and dragging/dropping the folder it
contains to the Level1 subfolder area (making it a Level2 folder instead of
a Level3 folder.) If there are hundreds, this could get quite tiresome. If
this is something that has to be repeated periodically (for whatever reason)
it could come downright annoying. Something else that would have to be
confirmed (or assumed) - all Level3 folders have an unique name.
What you two (TonySper and Spid) seem to be missing is the fact that there
are hundreds of unique Level2 folders containing one-each Level3 folder and
it is the Level3 folders that need to be moved out. CTRL+A works great to
highlight everything you see - so they could easily select ALL Level2
folders and perform whatever on all of them and their subfolders - but that
leaves the Level2\Level3 structure intact - not what is trying to be
accomplished.
With my layout above, what would be accomplished in the end - if I am
understanding the OP correctly - is the following:
\MainFolder\SubFolder(1)
\MainFolder\SubFolder(2)
\MainFolder\SubFolder(3)
\MainFolder\SubFolder(4)
\MainFolder\SubFolder(5)
\MainFolder\Sub-SubFolder(1)
\MainFolder\Sub-SubFolder(2)
\MainFolder\Sub-SubFolder(3)
\MainFolder\Sub-SubFolder(4)
\MainFolder\Sub-SubFolder(5)
....
\MainFolder\SubFolder(995)
\MainFolder\SubFolder(996)
\MainFolder\SubFolder(997)
\MainFolder\SubFolder(998)
\MainFolder\SubFolder(999)
\MainFolder\Sub-SubFolder(995)
\MainFolder\Sub-SubFolder(996)
\MainFolder\Sub-SubFolder(997)
\MainFolder\Sub-SubFolder(998)
\MainFolder\Sub-SubFolder(999)
At which point the OP would likely get rid of the original Level2 Folders
and end up with:
\MainFolder\Sub-SubFolder(1)
\MainFolder\Sub-SubFolder(2)
\MainFolder\Sub-SubFolder(3)
\MainFolder\Sub-SubFolder(4)
\MainFolder\Sub-SubFolder(5)
....
\MainFolder\Sub-SubFolder(995)
\MainFolder\Sub-SubFolder(996)
\MainFolder\Sub-SubFolder(997)
\MainFolder\Sub-SubFolder(998)
\MainFolder\Sub-SubFolder(999)
Do you better understand why this would be a job for scripting versus
copy/pasting...?
While I agree - if we are talking a couple of hundred - maybe even up to a
thousand at this point - it could have been done by now with some adept
usage of Windows Explorer (taking in my assumption that every Level3 folder
is uniquely named.) However - if this is something the OP will have to
repeat every so often - having a script to go to the third level and move
them all out