Ask HN: How do you organize your files
From a recent backup, there are<p>417,361 files<p>in my main collection of files for my
startup, computing, applied math, etc.<p>All those files are well enough organized.<p>Here&#x27;s how I do it and how I do related
work more generally (I&#x27;ve used the
techniques for years, and they are all
well tested).<p>(1) Principle 1:  For the relevant file
names, information, indices, pointers,
abstracts, keywords, etc., to the greatest
extent possible, stay with the old 8 bit
ASCII character set in simple text files
easy to read by both humans and simple
software.<p>(2) Principle 2:  Generally use the
hierarchy of the hierarchical file system,
e.g., Microsoft&#x27;s Windows HPFS (high
performance file system), as the basis
(<i>framework</i>) for a <i>taxonomic hierarchy</i>
of the topics, subjects, etc. of the
contents of the files.<p>(3) To the greatest extent possible, I do
all reading and writing of the files using
just my favorite programmable text editor
KEdit, a PC version of the editor XEDIT
written by an IBM guy in Paris for the IBM
VM&#x2F;CMS system.  The macro language is Rexx
from Mike Cowlishaw from IBM in England.
Rexx is an especially well designed
language for string manipulation as needed
in scripting and editing.<p>(4) For more, at times make crucial use of
Open Object Rexx, especially its function
to generate a list of directory names,
with standard details on each directory,
of all the names in one directory subtree.<p>(5) For each directory x, have in that
directory a file x.DOC that has whatever
notes are appropriate for good
descriptions of the files, e.g., abstracts
and keywords of the content, the source of
the file, e.g., a URL, etc.  Here the file
type of an x.DOC file is just simple ASCII
text and is not a Microsoft Word document.<p>There are some obvious, minor exceptions,
that is, directories with no file named
x.DOC from me.  E.g., directories created
just for the files used by a Web page when
downloading a Web page are exceptions and
have no x.DOC file.<p>(6) Use Open Object Rexx for scripts for
more on the contents of the file system.
E.g., I have a script that for a current
directory x displays a list of the
(immediate) subdirectories of x and the
size of all the files in the subtree
rooted at that subdirectory.  So, for all
the space used by the subtree rooted at x,
I get a list of where that space is used
by the immediate subdirectories of x.<p>(7) For file copying, I use Rexx scripts
that call the Windows commands COPY or
XCOPY, called with carefully selected
options.  E.g., I do full and incremental
backups of my work using scripts based on
XCOPY.<p>For backup or restore of the files on a
bootable partition, I use the Windows
program NTBACKUP which can backup a
bootable partition while it is running.<p>(8) When looking at or manipulating the
files in a directory, I make heavy use of
the DIR (directory) command of KEdit.  The
resulting list is terrific, and common
operations on such files can be done with
commands to KEdit (e.g., sort the list),
select lines from the list (say, all files
x.HTM), delete lines from the list, copy
lines from the list to another file, use
short macros written in Kexx (the KEdit
version of Rexx), often from just a single
keystroke to KEdit, to do other common
tasks, e.g., run Adobe&#x27;s Acrobat on an
x.PDF file, have Firefox display an x.HTM
file.<p>More generally, with one keystroke, have
Firefox display a Web page where the URL
is the current line in KEdit, etc.<p>I wrote my own e-mail client software.
Then given the date header line of an
e-mail message, one keystroke displays the
e-mail message (or warns that the date
line is not unique, but it always has
been).<p>So, I get to use e-mail message date lines
as &#x27;links&#x27; in other files.  So, if some
file T1 has some notes about some subject
and some e-mail message is relevant, then,
sure, in file T1 just have the date line
as a link.<p>This little system worked great until I
converted to Microsoft&#x27;s Outlook 2003.  If
I could find the format of the files
Outlook writes, I&#x27;d implement the feature
again.<p>(9) For writing software, I type only into
KEdit.<p>Once I tried Microsoft&#x27;s Visual Studio and
for a first project, before I&#x27;d typed
anything particular to the project, I got
50 MB or so of files nearly none of which
I understood.  That meant that whenever
anything went wrong, for a solution I&#x27;d
have to do mud wrestling with at least 50
MB of files I didn&#x27;t understand; moreover,
understanding the files would likely have
been a long side project.  No thanks.<p>E.g., my startup needs some software, and
I designed and wrote that software.  Since
I wrote the software in Microsoft&#x27;s Visual
Basic .NET, the software is in just simple
ASCII files with file type VB.<p>There are 24,000 programming language
statements.<p>So, there are about 76,000 lines of
comments for documentation which is
IMPORTANT.<p>So, all the typing was done into KEdit,
and there are several KEdit macros that
help with the typing.<p>In particular, for documentation of the
software I&#x27;m using -- VB.NET, ASP.NET,
ADO.NET, SQL Server, IIS, etc. -- I have
5000+ Web pages of documentation, from
Microsoft&#x27;s MSDN, my own notes, and
elsewhere.<p>So, at some point in the code where some
documentation is needed for clarity for
the code, I have links to my documentation
collection, each link with the title of
the documentation.  Then one keystroke in
KEdit will display the link, typically
have Firefox open the file of the MSDN
HTML documentation.<p>Works great.<p>The documentation is in four directories,
one for each of VB, ASP, SQL, and Windows.
Each directory has a file that describes
each of the files of documentation in that
directory.  Each description has the title
of the documentation, the URL of the
source (if from the Internet which is the
usual case), the tree name of the
documentation in my file system, an
abstract of the documentation, relevant
keywords, and sometimes some notes of
mine.  KEdit keyword searches on this file
(one for each of the four directories) are
quite effective.<p>(10) Environment Variables<p>I use Windows environment variables and
the Windows system clipboard to make a lot
of common tasks easier.<p>E.g., the collection of my files of
documentation of Visual Basic is in my
directory<p>H:\data05\projects\software\vb\<p>Okay, on the command line of a console
window, I can type<p>G VB<p>and then have that directory current.<p>Here &#x27;G&#x27; abbreviates &#x27;go to&#x27;!<p>So, to command G, argument &#x27;VB&#x27; acts like
a short nickname for directory<p>H:\data05\projects\software\vb\<p>Actually that means that I have --
established when the system boots -- a
Windows environment variable MARK.VB with
value<p>H:\data05\projects\software\vb\<p>I have about 40 such MARK.x environment
variables.<p>So, sure, I could use the usual Windows
tree walking commands to <i>navigate</i> to
directory<p>H:\data05\projects\software\vb\<p>but typing<p>G VB<p>is a lot faster.  So, such nicknames are
justified for frequently used directories
fairly deep in the directory tree.<p>Environment variables<p>MARK.TO<p>MARK.FROM<p>are used by some other programs,
especially my scripts that call COPY and
XCOPY.<p>So, to copy from directory A to directory
B, I navigate to directory A and type<p>MARK FROM<p>which sets environment variable<p>MARK.FROM<p>to the directory tree name of directory A.
Similarly for directory B.<p>Then my script<p>COPYFT1.RXS<p>takes as argument the file name and does
the copy.<p>My script<p>COPYFT2.RXS<p>takes two arguments, the file name of the
source and the file name to be used for
the copy.<p>I have about 200 KEdit macros and about
200 Rexx scripts.  They are crucial tools
for me.<p>(11) FACTS<p>About 12 years ago I started a file
FACTS.DAT.  The file now has 74,317 lines,
is<p>2,268,607<p>bytes long, and has 4,017 <i>facts</i>.<p>Each such <i>fact</i> is just a short note,
sure, on average<p>2,268,607 &#x2F; 4,017 = 565<p>bytes long and<p>74,317 &#x2F; 4,017 = 18.5<p>lines long.<p>And that is about<p>12 * 365 &#x2F; 4,017 = 1.09<p>that is, an average of right at one new
fact a day.<p>Each new fact has its time and date, a
list of keywords, and is entered at the
end of the file.<p>The file is easily used via KEdit and a
few simple macros.<p>I have a little Rexx script to run KEdit
on the file FACTS.DAT.  If KEdit is
already running on that file, then the
script notices that and just brings to the
top of the Z-order that existing instance
of KEdit editing the file -- this way I
get single threaded access to the file.<p>So, such facts include phone numbers,
mailing addresses, e-mail addresses, user
IDs, passwords, details for multi-factor
authentication, TODO list items, and other
little facts about whatever I want help
remembering.<p>No, I don&#x27;t need special software to help
me manage user IDs and passwords.<p>Well, there is a problem with the
taxonomic hierarchy:  For some files, it
might be ambiguous which directory they
should be in.  Yes, some hierarchical file
systems permitted to be listed in more
than one directory, but AFAIK the
Microsoft HPFS file system does not.<p>So, when it appears that there is some
ambiguity in what directory a new file
should go, I use the x.DOC files for those
directories to enter relevant notes.<p>Also my file FACTS.DAT may have such
notes.<p>Well, (1)-(11) is how I do it!