20 September, 2010

Create Multiple Folders Using Filenames

If you want to create multiple folders using filenames here is a simple way. You will however require WinRAR for this method. If you don't have WinRAR you can download a trial copy from here.
Here is how to do it:

I had 170 HTML files and I wanted to make folders having name of the files so that I can connect the HTML files to the data in the folders.
To solve the problem I used WinRAR. Here is the step-by-step procedure:

1. Select all the files; right click on any of them and go to the WinRAR menu.
2. Select "Add to archive..."
3. Now go to the 'Files' tab.
4. On the 'Files' tab select 'Put each files to separate archive' option.
5. Press Ok; You will get each file in separate folder.
6. Now select all the archives(zip or rar). Right click them and select 'Extract each archive to separate folder' from the context menu (shown below).

7. This will extract all the archives to separate folders having names of the original files.
8. But these folders will contain the original files (in my case there were .html files).
9. To get empty folders select all the folders and move (cut) them to a different directory (like Desktop). I will suggect you to make a 'New Folder' and paste all these folders in there.
10. Now in the parent directory Search for the file type you are having (I searched for *.html); put "*.ext" in the search box where ext is the file extension.
11. Delete the files in the result.
12. Now all the folders are empty.
13. Cut them again and paste in the original location. Done !

No comments:

Post a Comment