Yes you can shorten the cable, just keep the plug you cut off and be sure to duplicate the pin arrangement.