Chosen Solution

Initially my computer was having the flashing folder pop up problem. I took the harddrive out and hooked it up with an external hard drive with a USB. My computer booted fine then, so I figured it was the HD cable. I replaced the cable. and now my computer will start to load with the apple symbol and a loading bar underneath. Once the bar is full my computer shuts off. What should I do next?

I would start by resetting the SMC. Here’s a good Apple TN on how to do it Intel-based Macs: Resetting the System Management Controller (SMC).