Portable A/C unit used as dehumidifier
In theory, this will work just fine if you provide a way to collect the condensed water from the evaporator (the finned heat exchanger where the working fluid is evaporated to take heat from the "indoor" air). However, note that the more efficient window units take this water and spray it against the condenser (the other finned heat exchanger where the working fluid is condensed to pump heat into the "outdoor" air). This increases efficiency by making it easier for the condenser to transfer heat to the outdoor air (see heat of evaporation).

This is great for an air conditioner, but if you try to use such a unit as a stand-alone dehumidifier, with both intake and exhaust in the same room, then you'll just be pumping heat AND humidity from one side to the other, with no net gain (except for heating your basement). It's possible that you could intercept this transfer of water from the "indoor" to the "outdoor" side, but that would completely depend on the design of the air conditioner.