Wednesday, December 18, 2013

Batch File Creation Using the Dewey Decimal System

I wrote a batch command designed to create ten folders: one for each of the ten major categories of the Dewey Decimal System.  Inside of each of these ten folders resides one hundred folders that correspond to each of the sub groups of the dewey decimal system. 

Basically, the code consists of a big long series of make directory commands that look like the following:
md 000Generalities
md 000Generalities\000Generalities
md 000Generalities\001Knowledge
md 900_GeographyAndHistory\999Extraterrestrialworlds
I realize there might be a more elegant way to accomplish the same thing using -p but what is done is done.

I thanks to the University Library at the University of Illinois at Urbana-Champaign for publishing the entire Dewey Decimal System's structure online here.

Friday, December 6, 2013

Windows Tip - Create Lots of Files Fast

Credit goes to TechHead74 at this location for the following tip, which allowed me to quickly create a large number of folders.

Hi everyone! So I did find an answer to my question. I used the format that Steve provided for a while until I recently found a much better and easier way to do this. Below is an example. You can change it for your own purposes later.

1.) Create a root folder in which you want your other folders to appear.
2.) Open Notepad.
3.) Save your blank Notepad document as dir.bat.  Exactly like that (minus the period at the end of bat, of course).
4.) Within the dir.bat document, write the following:

md test1
md test2
md test3
md C:\Users\janedoe\Desktop

5.) Save and then close the dir.bat file.
6.) Go to Start -> Run.
7.) From the Run screen, browse for the dir.bat file and select open. In this example I would find it at C:\Users\janedoe\Desktop.
8.) Select OK. A command window may flash on the screen momentarily. That's okay.
9.) Go to the C:\Users\janedoe\Desktop. Your newly created files will be there.

- you can replace the test1 files with the names of the files you want to create
- to create file names with spaces put them in quotation marks. For example "md test 4"
- if your file folder has a name with spaces in it, put quotation marks around it. For example, md "C:\Users\jane doe\Desktop"
- to create a sub folder put a slash there. For example, md test3/graphics.
- double clicking the file is the same as running the file. If you want to edit the file right click the file and select edit.