We have a great (Porter and Cable) cordless drill but the batteries are no longer commercially available. Amazon has a listing but it's been sold out for the last five years. Do we have any other recourse? I'm kind of loathe to throw out a perfectly good drill, but to complete any project we have to charge both batteries completely. It would be nice if one battery would last just a touch longer.
Standard answer: No, not really. These proprietary battery packs often contain non-standard cells in order to cram as much power into as small a package as possible. As a result, trying to tamper with the pack could expose you to caustic, toxic chemicals, and with certain battery chemistries can even cause a fire. Do not try to disassemble a battery unless you have a high degree of knowledge about working with batteries.
While the batteries may have been discontinued by name, if Porter-Cable still makes ANY cordless tool, they may have retained the connector design. That would allow you to buy batteries marketed for a newer generation of tools that will work in your older ones. That's really your only shot at playing by the rules.
Alternately, you may be able to find a third party that makes battery packs that will fit your drill. This is an extreme long-shot; there may not be any off-brand packs, and if they exist using one may void the warranty, and may also have questionable QC that could be hazardous. But, it's definitely worth looking for.
Answer for people with knowhow and nothing to lose: MAYBE. I'm going to assume the battery pack is NiCd or NiMH chemistry and not Li+. NEVER mess with a Lithium-Ion battery pack; the primary ingredient (elemental lithium metal) will literally explode on contact with air. Even a minor manufacturing defect can cause these batteries to catch fire. Just don't. However, Li-Ion is pretty new and is the current generation of cordless tool batts, so if your tool's battery packs have been discontinued they're probably an older chemistry like Ni-Cd.
Anyway, if you have a Ni-Cd or NiMH pack, look for something you can unscrew or unsnap to open the outer casing (understand you have now voided any warranty that may still exist for the pack, so this is the last option). Take a look inside. If you see what look like garden-variety but un-labelled battery cells arranged inside the pack's enclosure, breathe a sigh of relief; they used commercial cells to construct the pack, and these are available wholesale in relatively small quantities to mere mortals. They're normally used by R/C hobbyists to make custom battery packs. You'll need to carefully document how the cells are connected to each other inside the pack, then carefully disconnect them from the main contacts and, with a set of new cells of the same chemistry, size and capacity, build a new bank of cells to replace these worn-out ones. This may require soldering battery contacts, which is an operation I DO NOT RECOMMEND IF YOU DO NOT HAVE A VERY HIGH LEVEL OF SKILL WITH A SOLDERING IRON. It is possible, but you need to have the skill and tools to make a good join quickly. A 40-watt pencil is the absolute minimum, and I really would recommend a soldering gun; it will have the heat you need to rapidly heat the work and solder to make a good join without heating the entire battery to the point of failure in the process.
Understand that you will likely void the warranty of anything you put one of your rebuilt battery packs into. So, I am only telling you it's a possibility because you are already considering just throwing the tool away with the packs.
If when disassembling the battery pack, you see square metal blocks or anything else that doesn't resemble a bank of cylindrical cells, stop. You will not be able to replace the cells without knowing exactly what they are and where you can get replacements. They may be available to normal people, but they may just as easily be proprietary to Porter-Cable, or only available in industrial quantities (like 10,000 cells at a time). If you can't find a supplier willing to wholesale them in smaller quantities you're probably stuck.
Sorry to disagree with KeithS, however there are many companies that rebuild NiCad battery packs. I'm not saying it is a great deal financially, however most common brands can be rebuilt. NiCad packs, for example, are made of several 1.5Vdc cells. the cells themselves are usually pretty uniform in size, however can differ in quality. Putting more in series makes for higher voltages, putting more in parallel gives higher AH ratings. Beware of super discounters, look for a company that offers a good warranty and replacement policy. An example: http://www.freedombatteryrebuilds.com not endorsing them, just an example of re-builders.