I have about 50 folders, within each of these is 10 sub-folders, these 10 sub-folders are then divided into a further 3 folders.
Now what I need to do is extract the following into one folder:
- for each of the 50 folders, I only need 3 specific folders out of the 10 sub-folders
- within those 3 folders I've chosen, I need only 1 out of the 3 sub-folders
- then extract all the files in this final sub-folder
This is definitely not a task I can do manually, as it will take forever. However, I can't just extract all files since I'm looking for specific folders.
Is there some type of program I can write to specify which folders to extract from? I'm also relatively new at computer coding in general, so the simplest solution would be appreciated!
-
I'm a DOS fan, so what I'd do is open a DOS window and run the 'Dir' command with '/S /B' switches from inside the top level folder:
'Dir /S /B > AllFiles.dir'
That'll get ALL of the files in a bare bones listing format into a flat file named AllFiles.dir such as:
c:\Windows\system32\snymsico.dll
c:\Windows\system32\d3dx9_24.dll
c:\Windows\system32\Boot\en-US\winload.efi.mui
c:\Windows\system32\catroot\cdr4x64.cat
etc., etc., etc.
Once in a flat file, if it's sortable to isolate what you want, sort it and delete the unwanted files. If a sort won't do the trick, write a program to filter out what you don't want and take whatever's left and go from there.
At this point, you can add the 'copy' or 'move' commands to the flat file, rename it to something like 'grabit.bat' and run the batch file to copy or move the files to wherever you want:
copy c:\Windows\system32\snymsico.dll D:\
copy c:\Windows\system32\d3dx9_24.dll D:\
copy c:\Windows\system32\Boot\en-US\winload.efi.mui D:\
copy c:\Windows\system32\catroot \cdr4x64.cat D:\
Note that the 'move' command first copies files to the destination, then deletes them from the old location, so you might be better off using the 'copy' command. Just depends upon what you want to accomplish. -
davepermen Notebook Nobel Laureate
if those folders are determined by name, or the files are (i could imagine it being different visual studio projects, and you want the final executables moved all together.. so you'd search for Release and *.exe), then select and move those search results that matter to you.
depends on how ordered/chaotic your folder structure is (but it sounds like it isn't chaotic, but too-much-ordered).
explorer with search and filters is very very powerful for such tasks.
Extract files from specific sub-folders into a root folder
Discussion in 'Windows OS and Software' started by caly, May 20, 2011.