Windows Directory Tree Maintenance: Pruning Unnecessary Files

P

Patient Guy

I have done some programming over the years, and was even paid to do it at
one time, although I am really not a programmer.

I have a 40 GB hard drive on my laptop which you can imagine gets filled
rather quickly.

Why?

I do mass spectrometry as part of my job, and there are certain true
things here:

1) Mass spectrum (data) files in general are huge, no matter whose
software you use.

2) Those who have produced the software I use are probably not coding
professionals, but rather the engineers/scientists like myself who build
the instruments during the week and who (pretend to) know Java/C++ and
write the code during the weekends to operate it.

So you can probably imagine what the often pieced-together-from-lots-of-
sources software I am using is like. The software is badly built actually
by any professional programmer's standards, and almost certainly produces
"temporary" files that fail to get cleaned up (deleted), and especially
when application crashes occur.

But I have to live with this badly written code and using the application
that is run by it, even considering the manufacturer has the nerve to ask
$25,000 for it, with a lot of it pieced-together open source software.
The justification for the price is that there are---what?----10,000
customers worldwide.

====

Which makes me appreciate the Microsoft Windows operating system even
more, since one generally gets a set of interoperating code that probably
does not leave around too many "temporary" files permanently on the drive.

But I realize that it is still possible to get these.

So I am asking what is a good way---and which files in general----to go
about cleaning the Windows directory tree of unnecessary files?

Here is an approach I am using now, but it does not tell me what is really
worth pruning out.

1. I open up a Search window from Explorer from the Windows directory. I
do a search on filename "*" (in other words, all files and folders) and
then let it complete.

2. I make sure that the Details view is set. If the fields 'Type', 'Date
Modified' and 'Date Created' do not appear in the listing, I make sure
they show.

3. I now sort or 'Type'. In particular, I am looking for text files that
seem deletable to me. For instance, I found several 'eula.txt' files
which appear in different languages. Why would I need to read a
'eula.txt' in Czech, for instance? They seem deletable to me. Also log
files of other applications (not Microsoft Windows log files) that look
like they number beyond 30 and with some of them made even before Windows
was re-installed in an emergency.

4. I then sort on the 'Size' field to get the big files on top. To look
for files hogging the disk and determine if they really should be doing
so.

5. Sorting on the Date fields might yield information about prunable
files too.

Of course, I am being very conservative here: if I have even the
slightest doubt that deletion of the file means Windows will not operate
on the next re-start, the file stays.

So more than likely, I am leaving many files on the directory tree that
really could be pruned.

Does anyone have any good ideas or thoughts or tips about how to maintain
the directory tree to a minimum of the necessary files?

One note before ending: I am sure that someone will respond with
something like "at pennies per gigabyte storage, why are you even wasting
your time---which is certainly more valuable, at least for most people----
worrying about deletion of probably a few hundred KB of files counting up
to maybe 20 files among 10,000?"

The answer is that it is not about me going out to buy a 100 GB USB plug-
in to complement my 40 GB laptop drive.

It is about having a single directory filled with 500 files rather than
what ought to be just 50, especially when I might have to look for a file
whose name I might not really know and a sort would not make quick work of
it.

If files are not really needed by the user after an install or after a
certain period of time, the disciplined applications need to write the
code that does that kind of file maintenance activity, rather than depend
on the users buying terabytes of storage to deal with code and data bloat.
 
P

Pegasus \(MVP\)

Patient Guy said:
I have done some programming over the years, and was even paid to do it at
one time, although I am really not a programmer.

I have a 40 GB hard drive on my laptop which you can imagine gets filled
rather quickly.

Why?

I do mass spectrometry as part of my job, and there are certain true
things here:

1) Mass spectrum (data) files in general are huge, no matter whose
software you use.

2) Those who have produced the software I use are probably not coding
professionals, but rather the engineers/scientists like myself who build
the instruments during the week and who (pretend to) know Java/C++ and
write the code during the weekends to operate it.

So you can probably imagine what the often pieced-together-from-lots-of-
sources software I am using is like. The software is badly built actually
by any professional programmer's standards, and almost certainly produces
"temporary" files that fail to get cleaned up (deleted), and especially
when application crashes occur.

But I have to live with this badly written code and using the application
that is run by it, even considering the manufacturer has the nerve to ask
$25,000 for it, with a lot of it pieced-together open source software.
The justification for the price is that there are---what?----10,000
customers worldwide.

====

Which makes me appreciate the Microsoft Windows operating system even
more, since one generally gets a set of interoperating code that probably
does not leave around too many "temporary" files permanently on the drive.

But I realize that it is still possible to get these.

So I am asking what is a good way---and which files in general----to go
about cleaning the Windows directory tree of unnecessary files?

Here is an approach I am using now, but it does not tell me what is really
worth pruning out.

1. I open up a Search window from Explorer from the Windows directory. I
do a search on filename "*" (in other words, all files and folders) and
then let it complete.

2. I make sure that the Details view is set. If the fields 'Type', 'Date
Modified' and 'Date Created' do not appear in the listing, I make sure
they show.

3. I now sort or 'Type'. In particular, I am looking for text files that
seem deletable to me. For instance, I found several 'eula.txt' files
which appear in different languages. Why would I need to read a
'eula.txt' in Czech, for instance? They seem deletable to me. Also log
files of other applications (not Microsoft Windows log files) that look
like they number beyond 30 and with some of them made even before Windows
was re-installed in an emergency.

4. I then sort on the 'Size' field to get the big files on top. To look
for files hogging the disk and determine if they really should be doing
so.

5. Sorting on the Date fields might yield information about prunable
files too.

Of course, I am being very conservative here: if I have even the
slightest doubt that deletion of the file means Windows will not operate
on the next re-start, the file stays.

So more than likely, I am leaving many files on the directory tree that
really could be pruned.

Does anyone have any good ideas or thoughts or tips about how to maintain
the directory tree to a minimum of the necessary files?

One note before ending: I am sure that someone will respond with
something like "at pennies per gigabyte storage, why are you even wasting
your time---which is certainly more valuable, at least for most people----
worrying about deletion of probably a few hundred KB of files counting up
to maybe 20 files among 10,000?"

The answer is that it is not about me going out to buy a 100 GB USB plug-
in to complement my 40 GB laptop drive.

It is about having a single directory filled with 500 files rather than
what ought to be just 50, especially when I might have to look for a file
whose name I might not really know and a sort would not make quick work of
it.

If files are not really needed by the user after an install or after a
certain period of time, the disciplined applications need to write the
code that does that kind of file maintenance activity, rather than depend
on the users buying terabytes of storage to deal with code and data bloat.

I won't talk about pennies and Gigabytes, althouth the thought
did cross my mind, but rather about two other points:
- Text files are usually small in size. On my Win2000 PC I have
just 390 of them, taking up 5 MBytes in total, with the largest
being 465 kBytes in size. This is chicken feed and will not give
you much extra free space if you delete them.
- Chances are that your disk is filling up with data files from your
"poorly written" (your words) application. You need to target
those: Write a batch file that deletes any file above xxx MBytes
in size and older than xxx days from your application directory.
Leave the Windows folder alone.
 
P

Patient Guy

I won't talk about pennies and Gigabytes, althouth the thought
did cross my mind, but rather about two other points:
- Text files are usually small in size. On my Win2000 PC I have
just 390 of them, taking up 5 MBytes in total, with the largest
being 465 kBytes in size. This is chicken feed and will not give
you much extra free space if you delete them.
- Chances are that your disk is filling up with data files from your
"poorly written" (your words) application. You need to target
those: Write a batch file that deletes any file above xxx MBytes
in size and older than xxx days from your application directory.
Leave the Windows folder alone.

Okay, I guess I learned what I wanted to know, and that there is really no
wasted space to worry about under the Windows tree.

And thanks for the tip on the batch file.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top