Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • Home
  • SEARCH
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 595295
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 13, 20262026-05-13T16:02:47+00:00 2026-05-13T16:02:47+00:00

I keep getting myself in knots when I am manipulating paths and file names

  • 0

I keep getting myself in knots when I am manipulating paths and file names because I don’t follow a naming standard for path components.

Consider the following toy problem (Windows example, but hopefully the answer should be platform independent). You have been given the path of a folder:

C:\Users\OddThinking\Documents\My Source\

You want to walk the folders underneath and compile all the .src files to .obj files.

At some point you are looking at the following path:

C:\Users\OddThinking\Documents\My Source\Widget\foo.src

How would you name the following path components?

A. foo
B. foo.src
C. src
D. .src
E. C:\Users\OddThinking\Documents\My Source\ (absolute path of the root)
F. Widget\foo.src (relative path of the file to absolute path of the root)
G. Widget\
H. C:\Users\OddThinking\Documents\My Source\Widget\
I. C:\Users\OddThinking\Documents\My Source\Widget\foo.src

Here is my attempt:

A. Base name? Basename?

B. File name? Filename?
The difference is important when choosing identifier names, and I am never consistent here.

C. Extension?

D. Extension? Wait, that is what I called C.
Should I avoid storing the dot, and just put it in when required?
What if there is no dot on a particular file?

E. ?

F. ?

G. Folder? But isn’t this a Windows-specific term?

H. Path name? Pathname? Path?

I. File name? Wait, that is what I called B.
Path name? Wait, that is what I called H.

  • 1 1 Answer
  • 1 View
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-05-13T16:02:47+00:00Added an answer on May 13, 2026 at 4:02 pm

    I think your search for a "standard" naming convention will be in vain. Below are my proposals, based on existing, well-known programs.


    A) C:\users\OddThinking\Documents\My Source\Widget\foo.src
                                                       ---
    

    Vim calls it file root (:help filename-modifiers)


    B) C:\users\OddThinking\Documents\My Source\Widget\foo.src
                                                       -------
    

    file name or base name


    C) C:\users\OddThinking\Documents\My Source\Widget\foo.src
                                                           ___ (without dot)
    

    file/name extension


    D) C:\users\OddThinking\Documents\My Source\Widget\foo.src
                                                          ____ (with dot)
    

    also file extension. Simply store without the dot, if there is no dot on a file, it has no extension


    E) C:\users\OddThinking\Documents\My Source\Widget\foo.src
       -----------------------------------------
    

    top of the tree
    No convention, git calls it base directory


    F) C:\users\OddThinking\Documents\My Source\Widget\foo.src
                                                --------------
    

    path from top of the tree to the leaf
    relative path


    G) C:\users\OddThinking\Documents\My Source\Widget\foo.src
                                                ------
    

    one node of the tree
    no convention, maybe a simple directory


    H) C:\users\OddThinking\Documents\My Source\Widget\foo.src
       ------------------------------------------------
    

    dir name


    I) C:\users\OddThinking\Documents\My Source\Widget\foo.src
       -------------------------------------------------------
    

    full/absolute path

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I keep getting this Magento error emailed to myself: URL: http://mysite.com/sendfriend/product/send/id/1/ IP Address: 66.249.65.69
Keep getting this error after inserting a subdatasheet into a query and trying to
Keep getting the error Arguments are not sufficiently instantiated for the multiplication by addition
I keep getting an error saying that @android:style/Widget.Holo.Light.Button.Borderless is not public and so can't
I keep getting this error and have no idea why. I googled and scanned
I keep getting this error on emulator: I copied this from a tutorial and
I keep getting this error Error in readPNG(destfile) : libpng error: PLTE: CRC error
I keep getting this error with my Play 2.0 application: play.core.ActionInvoker$$anonfun$receive$1$$anon$1: Execution exception [[MatchError:
I keep getting this stored procedure error (wrong number or types of the arguments)
i keep getting a sytax error when trying to add (function (e) { e.preventDefault;

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.