It might but if the females are close to birth shifting them will cause them to abort. Better to leave this lot and make sure conditions in the 2nd tank are ready next time the females are ready to drop. Make sure you have plenty of fine leaved plants in the tank and quite a few may survive. java moss is excellent for this.
Test the water in the other tank and if it is similar, move the males and leave the females where they are - easier.