I am always confused about when to use "at" and when to use "on" in spoken/written English. Consider some examples:

  1. I cant access the file at the path x
  2. I cant access the file on the path y
  3. He is not present at his desk.
  4. He is not present on his desk.

Which sentences are correct grammatically?

2 Answers 2


In general, we use "on" to describe something that is physically resting atop something else. We use "at" to describe something occupying a location. In a sense, "at" is more general.

If you said, "Bob is on his desk", people would normally understand you to mean that he is sitting or standing atop the desk.

"Bob is at his desk" is the more likely sentence. It means that he is in the location of his desk, probably sitting behind it.

Another similar word is "in", which means to be located inside something. "Bob is in his desk" would mean that someone has stuffed him into one of the drawers are something like that.

That said, there are conventions for how these prepositions are used that can be confusing.

We say that you are "in" a city or a country or some other large geographical region. Like, "Alice is in France."

For smaller areas, both "at" and "in" are acceptable and generally mean the same thing. "Carl is in the park." "Carl is at the park."

For buildings, we generally say "in" if you are inside the building. "David is in the Empire State Building." If you are outside the building -- like on the sidewalk in front of it or in the parking lot -- we say "at". But you can say "at" for someone inside the building. "David is at the Empire State Building" means he is in the vicinity, possibly inside, possibly outside.

If you are in a boat, we say you are "on" the body of water. "I'm in a fishing boat on the Atlantic Ocean".

You are "on" a planet. "The space probe is now on Mars."

Vehicles get complicated. You are "in" a car, but you are "on" a bus, ship, or airplane.


#1 is not correct since a file is accessed using (through) a path (full path name)

I can not access the file using the path(name)
I can not access the file on the environment search paths

just as locations are on a physical path.

However, a file can be found at an address.

#3 and #4 are grammatically correct, but the meaning may not be
If the person is not on their desk, then they certainly are not at their desk

on his desk

means the person is literally on top of their desk

Is he on the desk

means, is the person manning the desk or works at that position

Is he on the trading desk?
When is he on the help desk?

But if you are wondering if a person is working and using their desk

Is he at his desk?

should be used.

  • 2
    Not the main point, but: "I can not access the file at the path X" makes perfect sense if you mean that you are trying to access this file, but you do not have the right security clearance, or there is a hardware problem and the computer is unable to read the file, etc. Your discussion is valid if the problem is that there is something wrong with the path and you should be using a different path. But it's not valid if the intended meaning is that there's something wrong with the file, and the path is just a means of identifying that file.
    – Jay
    Feb 1, 2016 at 16:04

You must log in to answer this question.