Computor Companion Logo

Naming Date-Based Files for Easy Retrieval

by James H. ByrdProtected by Copyscape. Do not copy.

Q    I create a lot of documents for work. I have been trying to come up with a way to keep them organized, and the earlier Q&A on creating folders helped some. The problem I have now is that the files with numbers in the names don't sort properly in the file list. I get 11 before 2, and so on. Why is that, and is there some way to fix it? — J.D.

A    The problem you are seeing with file sorting has to do with the fact that Windows treats numeric digits in file names as characters. Numeric digits are just characters that have a lower sorting priority than the letters of the alphabet. For example, suppose you have a report that you always name Monthly Status with the month and year appended like this:

Monthly Status 1-2000.doc

Monthly Status 10-2000.doc

Monthly Status 11-2000.doc

Monthly Status 12-2000.doc

Monthly Status 2-2000.doc

… [files for months 3-8]

Monthly Status 9-2000.doc

Two things are wrong with this approach. The first problem is that your October through December documents appear after January instead of after September. Why? Because 1 sorts lower than 2, so all the names with a 1 in 16th character position in the filename sort before names with a 2 in the 16th position. You won't see the second problem until 2001, when the January 2001 status document falls between your January 2000 document and your October 2000 document. That's probably not what you want to see happen.

When you are trying to get file names to sort correctly, start at the leftmost character and work right. To fix the problems, you must do two things: First, put the year before the month and always use a full four-digit year. Second, always use a two-digit month, with a zero preceding single-digit months.

So, the new file list looks something like this:

Monthly Status 2000-01

… [files for months 2-8]

Monthly Status 2000-09

Monthly Status 2000-10

Monthly Status 2000-11

Monthly Status 2000-12

In 2001, your January status document will follow all the 2000 documents as it should. Using a consistent naming convention helps you organize your files and makes it easier to find those files later.

Like this article? Get our 21-part business course (It's free!)

Enter your email address:

Or click here to read more about the course

Share this Article

Email to a Friend

Discover the hidden
profits in your biz!


 
 
Advertise on
Computor Companion


  Articles by Category  
  Most Recent Articles  
  Most Popular Articles  
 Getting Clients 
  Online Marketing  
  Offline Marketing  
  Publicity and Promotion  
  Communications  
  Design and Graphics  
  Web Sites and Ecommerce  
 Developing Your Business 
  Musings and Reflections  
  The Entrepreneurial Lifestyle  
  Money Matters  
  Office Setup  
 Doing the Work 
  Product Development  
  Business Operations  
  Outsourcing and Delegation  
 Productivity 
  Online Productivity  
  Office Software  
  Organization  
 Tools, Tips and Resources 
  Hardware Tools  
  Software Tools  
  Resource Roundup  
  Computor Companion This site powered by the Logical Web Publisher™: Content management by Logical Expressions, Inc. Click to verify BBB accreditation and to see a BBB report