"Located in" vs "located at"

What's the difference between them?

I am interested in a generic definition, but here is the sentence I was writing:

"The file is located at/in the images folder."


Solution 1:

in would refer to a container holding the object.

The pen lies in the box

at would refer to the location of the object.

The box is at the shop

In your context, as the folder contains the file, therefore, use of in would be appropriate.

Of course, they, at times, can be used interchangeably (Thanks @FumbleFingers). This link gives a nice comparison between the use of at and in.

Solution 2:

Well, I will go with located in the folder here, which sounds more natural. Files are generally stored within the folder of a computer system, so the proposition in is more appropriate and accurate than at. the proposition at usually go with home/office/university/point/stage/time/... these words and so on, indicating where/when exactly things happen.