Index Digital Docs in 10 Seconds Flat with DOS

Now that we’re in the age of digitized documents, you’ve probably gotten one of those CDs, DVDs, or USB drives containing what would otherwise be reams upon reams of paper. While the digital versions certainly take up less space in your office, there’s no obvious physical structure to what’s been produced. And if you’ve gotten the disk from an adverse party, there’s probably no folder or file list available, either.

So how you get a handle on all that (virtual) paper?


Obviously, printing the whole disk and organizing everything into physical folders is too cost-prohibitive and space-intensive (although I have seen it done). And I was a little shocked recently when one of our firm’s paralegals announced that the only way to get a definitive list of an expert deponent’s voluminous document production was to take a bajillion screenshots of the Windows Explorer view of his USB drives and directories and paste them into a Microsoft Word document for her boss, a task she said would take her all day.

“Oh no,” I said. “There’s a much easier way to do that.”

One simple DOS command saves the day (literally)

Graphical user interfaces like Windows are great, but some problems are really best solved by good old command line DOS. A lot of Windows users don’t realize they can still use DOS commands. But you have to open a special window called Command Prompt to do it.

The easiest way to get to the Command Prompt window in any version of Windows is to click the Start button, navigate to the Accessories folder, and find Command Prompt in the list. If you’re using Windows 7 or Vista, you’ll need to right-click on Command Prompt and choose Run as Administrator to get the proper access to the disk. (If you’re still in Windows XP, you may simply be able to left-click Command Prompt, or you may need to right-click it, choose Run As, and choose an Administrator account to get the right permissions).

DOS start command prompt Index Digital Docs in 10 Seconds Flat with DOS

Click Yes at the next prompt and you’ll get a small window like this:

DOS command prompt e1327160737867 Index Digital Docs in 10 Seconds Flat with DOS

Now, all you have to do is type one simple DOS command:

DOS dir command short e1327160854417 Index Digital Docs in 10 Seconds Flat with DOS

Adapting this command for your use

For those not familiar with DOS, let me break out the example above for you:

dir – This is the “directory” command in DOS, instructing the operating system to list the files in a certain location meeting specific criteria.

g: – This is the drive letter I used for this particular example, an external drive I have attached my computer. In your case, you might want to list the files on d: (your CD or DVD drive) or e: (a USB flash drive) or whatever other disk you’re examining. Just substitute the right letter with a “:” after. (If you don’t know which drive letter is assigned to that particular device, go to My Computer to figure out the right one.)

*.* – The asterisks in this part of the command are wildcards which tell DOS, essentially, “I want a list of all the files, regardless of their names or file extensions.” If you just wanted to see a specific file type (like all the Adobe Acrobat files), you could use *.pdf, or you could use *.xl* to capture all the Microsoft Excel documents (since the file extensions vary slightly between versions of Microsoft Office).

/s – This is what’s known as a “switch,” which modifies the dir command and instructs it to list the contents of all subdirectories (what you probably know as folders). If you’re wanting to get a list of everything that’s on the disk, this is key.

> – This is a redirection command. Without it, DOS would simply scroll a list of all the files onto the screen, which won’t do you much good. What you want is for DOS to dump the list into a text file instead.

c:\list.txt – For this example, I instructed DOS to save the directory listing in a file on the main hard drive (c:) in its root directory (\) and call the file list.txt (the .txt file type is a generic ASCII text file any word processor can use). Obviously, you can redirect the file directory into any disk, directory, and filename (although you will probably want to still use the file extension .txt).

Once you type in the command above and hit the Enter key, you might feel a little disappointed. The Command Prompt window’s cursor simply returns to a blank command line prompt after a few seconds without showing anything — no confirmation, no error message, nothing. But open up Windows Explorer, navigate to the drive and directory you designated above, and double-click on the file name you chose. What you’ll see is something like this:

DOS dir command results e1327160940484 Index Digital Docs in 10 Seconds Flat with DOS

As you can see from the example above, the DOS dir /s command starts by listing everything in the root or top-level directory, then listing everything in the first directory (a.k.a. folder), then drilling down into all of that folder’s subfolders before coming back up to start the process over again with the next folder, etc. The end result is a truly comprehensive list of every folder and file on the disk, logically structured and searchable, too. While you can leave that list in its original text file, you can also copy that into any word processor and dress it up however you please.

10 seconds versus an entire day

When you’re hurriedly preparing for a deposition (as was the case here), the last thing you need is busywork. (Our under-the-gun paralegal was thrilled that I’d just freed up several hours of her time to work on something else just as critical.) If you work in litigation or another practice area where electronically produced documents are the norm, this one DOS command is a good little trick to have in your back pocket. And the best part is, it doesn’t cost you a dime.

(photo: http://www.flickr.com/photos/n3wjack/4661409838/)

, , ,

  • http://lawyerist.com/author/samglover/ Sam Glover

    I’ve been doing this for years, but whenever I try to show someone else, their eyes glaze over, even though it’s basically a copy-and-paste operation. It’s a huge timesaver, though, and you can create a similar list in OS X and Linux.

  • http://robertslawmn.com/ Jack Roberts

    Good post–it will be immediately useful to me (and is worthy of a “star” listing in my Google Reader).

  • Dan

    At the risk of sounding dense…how does having a list of file names help (or really, do anything for that matter)? Now I have a list that looks something like this: “00001-000234.pdf; 00235-00999; etc.” I’m sure I’m missing something here, but I just don’t see the value in this.

    • http://lawyerist.com/author/samglover/ Sam Glover

      You should probably use more descriptive file names.

      • Dan

        Ok, but that doesn’t really address the scenario (illustrated by OP) in which I get a CD from opposing counsel. It also doesn’t exactly address my question. Can someone please explain the practical use(s) of doing this?

        • http://lawyerist.com/author/samglover/ Sam Glover

          First, you’re going to need a list of file names no matter what kind of index you want to assemble. At a minimum, this will save a lot of time over manually copying each file name into a spreadsheet for a paralegal to summarize each file’s contents. However, if opposing counsel has used decent file naming conventions, it will also give you an idea of what you have got.

          I used it all the time for my own document production. I would just send opposing counsel a list of all my non-privileged files so that they could request the ones they wanted.

          • http://legalofficeguru.com Deborah Savadra

            First, I echo Sam’s comment about meaningful file names. That’s going to make a huge difference.

            Second, a lot of the usefulness of this depends on your practice area. In litigation, having a list like this is invaluable. Other practices, perhaps not so much.

            Third, having a plain-text file of document names can form the basis of a document database (particularly if you append the /b switch for “file names only, which I did not discuss above for the sake of keeping things simple). The list *could* be (depending on what software you’re using) imported rather than having to be keyed in by staff.

            There’s also a good bit of value in seeing the structure of what’s been produced. If the files have been produced in a logical, nested folder order (say, if the first level of folders were party names, with subfolders under each for medicals, employment records, etc.), then the list being produced by this method gives you both a bird’s eye view of how that party/witness has structured their responses and a road map for reviewing it all. When opposing counsel engages in what one attorney I know calls the “Bury Their A** in Documents School of Litigation,” having a list like this can help minimize the overwhelm they’re trying to inflict on you.

  • SF Devereux

    What a useful tip! Thanks very much for this, it’ll save a *huge* amount of time when we next have to catalogue the contents of a directory.

  • Max Mednik

    Thanks for sharing! It’s funny how old school stuff still works great!

    Big fan of your blog in general. I’m actually a student working on a project called Ridacto (http://www.ridacto.com). We’re creating an artificial intelligence system for attorneys and business professionals to be able to create more bulletproof legal contracts. In a world where more and more docs are going digital like you’re describing and so much back and forth on contract negotiation, it’s easy for mistakes and inconsistencies to get into documents, and we’re try to help people prevent that. I’d be curious to learn what you think!

    Thanks again for sharing!

  • http://compujurist.com/ Nerino Petro

    Great tip. However, there is an even easier way to get to the Command Prompt in Windows 7. Go to Start and in the Search box type “cmd” (but without the quote signs). This opens the Command Window and you’re set unless you don’t have the necessary permissions. Then you will need to follow your directions.

    Keep up the great work!

  • http://www.gross-shuman.com Kim St. George

    Has anyone ever used Karen’s Print Directory? That is what I have used for years now. You can save as well as just print. http://www.karenware.com/powertools/ptdirprn.asp