0

I have 20-30 folders that are in a root folder. The folders contain a single file or some files with same extensions. Is there a more efficient way for extracting the files than select all folders -> ctrl + enter -> extract file & close window in Windos 8.1?

1 Answer 1

1

Assuming Windows 8.1 works like Windows 7 you could go to the root directory and then search for * to find all the files. This should list all of the files in all of the subdirectories in one spot. You could then select all the files and move them to where you want them to go.

An arguably better way, if you are comfortable with the command line, is to create a batch script to recursively loop through the directories and copy the files. Something like this should work (fair warning: I haven't tested it, so you'll probably want to make a backup first if possible):

for /F %%A in ('dir /b /s /a-d ROOT\DIRECTORY') do copy %%A DESTINATION\PATH

Replace ROOT\DIRECTORY with the path of the root folder and DESTINATION\PATH with where you want the files to end up. You could also just type the for loop on the command line (rather than putting it in a .bat file), but if you do then use %A rather than %%A.

The above for loop basically calls dir to list all of the files under the root directory and then for each entry, it calls copy to copy them to the destination directory.

An explanation of the dir options:

/b: only prints the file name and path and none of the header/footer stuff

/s: makes it recursively go through each of the subdirectories

/a-d: makes it not print out directories, so only the files are listed (otherwise it would try copying each of the directories themselves to the destination)

Typing dir /?, for /? or copy /? on the command line will tell you more about the usage if you're interested.

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .