I bought a bottle of wine larger than required for my recipe. How and how long can I keep the remainder, so I can use it in cooking again? (In other words, it needn't be drinkable.) 
Tightly closed and in the fridge it will keep for a few days, maybe a week if you can tolerate it being a bit rough (which you can for some dishes like my tomato, smoked garlic and red wine sauce with chilli - in fact that doesn't want anything too delicate to start with).  If there's less than about 2/3 of the bottle left, transfer to a smaller container.   But that's not what I would do. Instead I'd freeze it in useful quantities. There are two things to bear in mind of you freeze wine: it expands (so use a bigger container than you think); and it doesn't go completely solid (so keep it the right way up). In the freezer it keeps indefinitely.  You don't want it to go far beyond drinkable, unless your recipe calls for vinegar as well, which you should use less of.  