[Skip to Content]
Visit us on Facebook Visit us on FacebookVisit us on Twitter Visit us on TwitterVisit our RSS Feed View our RSS Feed
Region 7 Update November 22nd, 2024
CategoriesCategoriesCategories Contact UsContact Us ArchivesArchives Region/OfficeRegion SearchSearch

Jul

31

Date prong graphic

RDM Snippets – File Naming Conventions and Dates

Posted by on July 31st, 2020 Posted in: Blog


This is the first post in a monthly series that will share tips, tricks, and resources that help you simplify the process of organizing your data. It’s always good to refresh your skills and think about different ways to manage data, as well as learn ways that librarians and others can communicate this information while teaching or working.

This month let’s look at file naming conventions, including date formatting. Having a file naming convention can save you both time and energy, especially when you’re managing large amounts of data. A good file naming system makes it easy to find specific files, sort by date or time, and to organize different parts of a workflow.

File naming isn’t just for research, it can also help organize your personal or work files.

As you begin a research project or plan to start organizing your files, think about the types of files you have. Determine a simple but descriptive structure. Be sure to share this with anyone you may be collaborating with, and make a file with notes for yourself to keep track of the convention.

Important things to remember when creating with a file naming convention:

  • Be descriptive. Don’t worry about trying to abbreviate or keep the file name short. Descriptive is better than inscrutable. You won’t remember what that made-up abbreviation is next time you go to look at the file, and the people you work with won’t understand it either. If you need to use any abbreviations or shortened terms, make a note of these in your documentation.
  • Make the file name human and machine readable. Use_underscores_ or-use-dashes. Don’t use spaces between terms in the file name. Many software programs no longer allow spaces. Spaces can also cause errors in coding languages if you are using them for analysis.

Bad: stdntsrvjan20

Good: student_survey_january_2020

  • Make your file names extensibile. This means ordering numbers in the file names so that the computer can sort them in the correct order and you can easily read them. You can see in the example below that adding additional digit spaces makes the numbers sort nicely into order.
Bad Good
sample_1 sample_001
sample_10 sample_002
sample_2 sample_003
sample_3 sample_004
sample_4 sample_005
sample_5 sample_006
sample_6 sample_007
sample_7 sample_008
sample_8 sample_009
sample_9 sample_010
sample_11 sample_011
  • Avoid special characters such as $ % ^ & # | :,. They can cause errors if you are working with programming or scripting languages, and many software programs won’t accept them.

Dates

Dates can be an important part of your file name. Formatting dates the same way each time and in a universal standard format such as ISO 8601 will make them easier to read and avoid confusion over different international formats for writing dates.

The ISO8601 date format is YYYY-MM-DD.

Examples:

2020-07-04

2020-12-25

If needed, you can make the date more granular by adding the time including hours, minutes, and seconds for observations that need to have a time stamp.

YYYY-MM-DDTHH:MM:SS

2020-07-04T11:05:01

The full ISO8601 standard has much more information about breaking down dates and times even further.

(insert below comic here, https://imgs.xkcd.com/comics/iso_8601.png to download image or hotlink)

Link to source for posting in the blog: https://xkcd.com/1179/

Further resources on dates and file names:

Data Librarian Kristin Briney has written a great blog post about naming conventions, and has a worksheet  you can use to determine a naming convention for your project.

The ISO8601 standard

DataOne Best Practices for Date and Time

The next RDM Snippets post in August will look at stable file formats for open and/or long term access and preservation.

Image of the author ABOUT NNLM Region 7
Network National of Libraries of Medicine, Region 7

Email author View all posts by

NNLM Region 7
University of Massachusetts Chan Medical School
55 Lake Avenue North
Worcester, MA 01655
(508) 856-5985

This has been funded in whole or in part with Federal funds from the Department of Health and Human Services, National Institutes of Health, National Library of Medicine, under cooperative agreement number UG4LM012347 with the University of Massachusetts Chan Medical School.

NNLM and NETWORK OF THE NATIONAL LIBRARY OF MEDICINE are service marks of the US Department of Health and Human Services | Copyright | HHS Vulnerability Disclosure | Download PDF Reader