Tips & Tricks

Best Practice for the file or folder naming conventions !

Best Practice for the file or folder naming conventions

Avoid extra long folder names and complex hierarchical structures but use information-rich filenames instead

Dos: Z:\Prod\QA\My_Code_Tips.xls

Don’ts: Z:\Production \Quality Control\MY \Code \Tips\ My_Code_Tips.xls

Reason: Complex hierarchical folder structures require extra browsing at time of storage and at the time of file retrieval. By having all the essential information concisely in the file name itself, both the search and identification of the file is streamlined and more precise.


Put sufficient elements in the structure for easy retrieval and identification but do not overdo it

Dos: NOVALEC_37507_INVOICE_20090703.pdf


Reason: Precision targeted retrieval requires sufficient elements to avoid ambiguous search results but too much information adds undue effort at file naming time with little or no returns at retrieval time.


Use the underscore (_) as element delimiter. Do not use spaces or other characters such as: ! # $ % & ‘ @ ^ ` ~ + , . ; = ) (

Dos: SMITH-J_AXA_7654-6_POLICY_20120915.pdf

Don’ts: SMITH-J AXA 7654-6 POLICY 20120915.pdf

Reason: The underscore (_) is a quasi standard for field delimiting and is the most visually ergonomic character. Some search tools do not work with spaces and should be especially avoided for internet files. Other characters may be interesting but visually confusing and awkward.

Use the hyphen (-) to delimit words within an element or capitalize the first letter of each word within an element

Dos: mycode-tips_AIG_7654-6_POLICY_2009-09-15.pdf

Don’ts: my code tips AIG 7654 6 POLICY 2009 09 15.pdf

Reason: Spaces are poor visual delimiters and some search tools do not work with spaces. The hyphen (-) is a common word delimiter. Alternatively, capitalizing the words within an element is an efficient method of differentiating words but is harder to read .

Elements should be ordered from general to specific detail of importance as much as possible

Dos: FY2009_Acme-Corp _Q3_TrialBal_20091015_V02.xls

Don’ts: TrialBal _Q3_20091015_Acme-Corp_V02_FY2009.xls

Reason: In general the elements should be ordered logically, in the same sequence that you would normally search for a targeted file.
The order of importance rule holds true when elements include date and time stamps. Dates should be ordered: YEAR, MONTH, DAY. (e.g. YYYYMMDD, YYYYMMDD, YYYYMM). Time should be ordered: HOUR, MINUTES, SECONDS (HHMMSS)

Dos: RFQ375_Cables-Unlimited _BID_20091015-1655.pdf

Don’ts: RFQ375_Cables-Unlimited _BID_10152009-1655.pdf

Reason: To ensure that files are sorted in proper chronological order the most significant date and time components should appear first followed with the least significant components.

Personal names within an element should have family name first followed by first names or initials

Dos: Tate-Peter_SunLife _1-7566-2_POLICY_10YrTerm.pdf

Don’ts: Peter-Tate_SunLife _1-7566-2_POLICY_10YearTerm.pdf

Reason: The family name is the standard reference for retrieving records. Having the family name first will ensure that files are sorted in proper alphabetical order.

Abbreviate the content of elements whenever possible

Dos: RevQC _QST_2009-Q2.xls || MCIM_27643_POD.doc

Don’ts: Minister of Revenue Quebec _Quebec-Sales-Tax_2009-2ndQuarter.xls

Reason: Abbreviating helps create concise file names that are easier to read and recognize.

An element for version control should start with V followed by at least 2 digits and should be placed as the last most element. To distinguish between working drafts (i.e. minor revisions) use Vx-01->Vx-99 range and for final draft (i.e. major version release) use V1-00-> V9-xx. (where x =0-9)

Dos: MCIM_Proposal_V09.doc

Don’ts: MCIM_Proposal_9.doc

Reason: The “V” helps denote that the element pertains to a version number. A minimum of 2 digits with a leading zero is required to ensure that search results are properly sorted. The intent is to avoid the situation where for example, a filename with a “V1-13” will wrongly appear before an identical filename with a “V1-2” version number when sorted in ascending alphabetical/numerical order. To distinguish between working, review and final draft a single digit prefix followed by hyphen “-” is preferred to facilitate proper sorting; using words in the file name such Final, Draft or Review in the filename affect the order and should be avoided.

Prefix the names of the pertinent sub-folders to the file name of files that are being shared via email or portable storage devices

Dos: Prod_PS_AssL7_WO_Suzuki_J3688-20090725.xls || FY2009_Acme-Corp _Q3_TrialBal_20091015_V02.xls

Don’ts: WO_Suzuki_J3688-20090725.xls || Q3_TrialBal_20091015_V02.xls

Reason: Attached files and files shared through portable devices include only the file name and can be totally devoid of the context that is generally provided by the folder structure of origin. To compensate and avoid confusion it is sometimes essential to prefix the name of the subfolder(s) to such file names.


Passionate about coding and software development holding 10+ Years of experience including 6+ years of experience on Mobile application Development.

More Posts