Skip to content

SOLVED: Finding my important files.

October 30, 2010

Darwinism scares me. Be glad you are not me. I know enough to be dangerous and I am. So as our species fights for survival I worry about you because I worry about me. My creativity gets the better of me often enough, as I drop new documents into various places on my computer. Where DID I put that thing? What was I last working on?

While natural selection should limit my ability to survive my own creative stupidity, technology helps me survive it. Having worked with computers many years, I have amassed a huge number of files on various hard drives, several of which are not even online anymore.

I suppose this is much like a classic photo album problem. I take a lot of photos, and have some nice albums of special pictures, but a lot of my photos are heaped in boxes in the basement. My computer files are kind of like that. My data has migrated from hard drive to hard drive. Some I use daily and other files rest in directories with names of computers long gone.

Recently I needed to put together a simple script to go find all my Word documents. I used to live by the fact that Word would remember my recent files, but I started opening a collection of word documents and all my recently useful names were replaced with the filenames I momentarily browsed and opened.

The Windows Indexer and even Google Desktop can help if you know what you are looking for, but neither can help if you don’t know what you are looking for. It’s the classic “what SHOULD I be asking” problem.

In this script, I happen to use a USB card for my temporary storage. This is my H: drive. The file extension that I am looking for is .DOC* and the list of drives that I want to search is B, C, D, E, F, G, H, I, J, Q, R and S. Can you see why I need a script for this? Your list of drives is likely to be shorter.

Running this script produces a list of every .DOC or .DOC* file that I can find, stored in a result file H:\MyDOC.txt.

You can change the file extension with this script to search for XLS or PDF or any other file type that you desire, without having to change the rest of the code.

Using notepad, I created a FindMyDOCfiles.cmd file with the following lines of code:

set .Ext.=DOC
set .Boost.=H:
set .List.=B C D E F G H I J P Q R S
echo %.Boost.% > %.Boost.%\My%.Ext.%.tmp
echo %.Boost.% > %.Boost.%\My%.Ext.%.err
for %%n in ( %.List.% ) do DIR /B /S %%n:\*.%.Ext.%* > %.Boost.%\My%.Ext.%%%n.tmp 2>> %.Boost.%\My%.Ext.%.err
for %%n in ( %.List.% ) do copy /A /V /Y %.Boost.%\My%.Ext.%.tmp+%.Boost.%\My%.Ext.%%%n.tmp %.Boost.%\My%.Ext.%.tmp
copy /A /V /Y %.Boost.%\My%.Ext.%.txt %.Boost.%\My%.Ext.%.old
copy /A /V /Y %.Boost.%\My%.Ext.%.tmp %.Boost.%\My%.Ext.%.txt
del %.Boost.%\My%.Ext.%*.tmp

If you wanted to find Excel files, the script would find *.XLS* if you just change the first line to:
set .Ext.=XLS

This is just a tool not a search solution, but it helps me find a few things I should have known to look for. If only I could use it to find my car keys.

No comments yet

Leave a Reply

Fill in your details below or click an icon to log in: Logo

You are commenting using your account. Log Out /  Change )

Google+ photo

You are commenting using your Google+ account. Log Out /  Change )

Twitter picture

You are commenting using your Twitter account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )


Connecting to %s

%d bloggers like this: