Recently, I found an old Gateway 2000 Colorbook laptop with MS-DOS6.22/Win3.1 that had no ports but PS2, parallel, and serial ports. My modern computer doesn't have any of these ports, so I am trying to use an old Optiplex 755 with a Vista/Kubuntu dual boot to try and send files over parallel port. The laptop's only removable media is a floppy disk, and unfortunately I don't have a spare floppy drive to put in any machine. Is there an easy way to accomplish file transfer using parallel or serial ports, or do I need to buy floppy disks?
You can send data/receive data over the serial port using a null modem cable, or adapter with a serial cable. However, odds are high that you dont have one. On top of that, you will need to install software (such as a very old version of Laplink) on the laptop in order to use it. Even if you do purchase the cable, floppy disk, and find and install the software, transferring files will be slow.
Your easiest solution would be to buy an IDE/SATA to USB adapter. Simply remove the hard drive from your laptop and connect it to this device. Then plug the USB end into your Optiplex and you will be able to transfer data.
USB-to-serial adapters exist. The transfer speed might be nothing to write home about, but how much data are you going to fit on floppy disks anyway?
A reasonable program for transfering files via serial line is Kermit. Should be available for any operating system worth its salt.
Before trying out the "hardcore" no-extra-tools method I describe below, check if your Optiplex has a PATA port available inside - in which case, likely all you need is an adapter for a 2.5" PATA drive (the plugs are different in 2.5" vs 3.5"/5.25" PATA form factors...) and you can just remove the harddrive from the laptop and access it in the Optiplex. If anything nonessential (CD drive?) is already on the PATA bus, disconnect it unless you know what you are doing with PATA, the Master/Slave/CS mechanics could complicate things.
There were laptops that used harddrives on the ancient ST506 or ESDI interfaces - try to check that beforehand (google the model number on the harddrive and get a spec sheet), do not attempt to connect such a drive to a PATA machines.
Or, you could get a PATA to USB adapter, they are not expensive.
The ports are accessible as device files under DOS (COM1...x , LPT1...x), and can be used as a target for a COPY command or a redirected TYPE command. On the linux end, the ports are also accessible as device files (/dev/ttyS0..x, /dev/lp0..x), and can be read from, eg with "cat /dev/ttyS0 >> some.file.txt".
These will need a null modem cable for serial transfer (if you have a normal serial cable that you can physically connect, try swapping the wires to pins 2 and 3 on the 9 pin end), or a corresponding parallel cable (which is rare, most of them had a centronics plug on the other end which doesn't mate to a PC parallel port physically). Actually, any wire hookup connecting pins 2 and 3 crossed and pin 5 to pin 5 (assuming 9 pin pinout) should work on serial if you keep the wires short and close together. Let's ignore parallel for now, since you would need to set up STROBE/ACK signalling correctly to work with the DOS device drivers...
In case of using serial ports, you will need to configure the ports on both computers, with stty on the linux side and MODE on the DOS side. Note that these configuration settings are NOT persistent across reboots. I would suggest trying 115200,8,o,1 and downgrading the speed if it doesn't work - i'd keep the parity on, though, since it is there for detecting errors caused by electrical interference. Also, make sure that there is no kind of newline translation mechanism set active (I do not know if some DOS versions manage such via the MODE command).
If you need to transfer multiple files, your best bet is combining them into an archive - if PKZIP is available on the DOS machine, it can be unpacked with the "unzip" or "zip x" commands on the linux side. However, you might need to repeat the transfer in the worst case, serial communication can be not 100% reliable against interference.
Assuming you have the correct cable (either parallel or serial), you could install Virtualbox on the Optiplex, install MS-DOS as a guest, and use the serial or parallel port pass-thru to expose the port on the Optiplex to your guest OS. You should be able to transfer your files to the guest OS that way. After that, it's just a matter of using the shared drive feature to copy the files onto the host OS. MS-DOS includes INTERSVR and INTERLNK, which you can use for the initial transfer.