Although the direct connection using a special parallel cable or serial cable will work, the transfer rates will be very slow. Cables for doing this can be purchased at your local computer store and the Direct Connection software is built in to all verisons of Windows. Setting it up, in my experience, requires a bit of vodoo or magic, but tutorials can be found at:
It is much easier to set up a true peer to peer network to transfer files and install software, but this requires an ethernet adapter in each computer. The ethernet adapters can be connected to each other directly using a special kind of network cable, called a cross-over cable. A good tutorial on setting up a peer to peer network can be found at:
On the other hand, there is an interesting alternative. A friend of mine had a laptop with no modem, no flopy or cd, no USB, and no Ethernet (he got it used... turned out parts were missing). Also, the Win95 instalation was bare-bones... no NETBUEI, for example. As a result, he couldn't get any files onto the thing, no way, no how.
What I ended up doing was buying him an adapter that turns an external bay on your desktop into a laptop HD bay (they run for as little as five bucks). We then booted from the laptop's HD and used the desktop to install everything (we even copied the Win98 cd to the drive, just in case). When we dropped the drive back into the laptop, it worked like a charm.
I'll admit it's hardly the ideal solution, but it's a great fix for a machine with no connectivity.