There are many instances where by and with mean something completely different, but which is the correct preposition usage in the following sentences?
- A file by the same name as the original file.
- A file with the same name as the original file.
Do the two sentences above mean something different, or can they be used interchangeably? What general rules (of thumb) govern the correct usage of the prepositions by and with?
If you rewrite the sentences to
- A man by the same type of hat as the original hat.
- A man with the same type of hat as the original hat.
then they obviously don't mean the same. In the former sentence, the man is next to the hat, in the latter, he is wearing or holding it. Is the distinction between a material and immaterial object of the sentence (in this case the hat, in the former case the name) what generally governs the correct usage of by and with?