I just bought a new HDD some time ago and recently I bought another SATA cable to have both HDDs connected at the same time, to transfer all the files from the older one to the newer.
When I connected both of them, the computer started working, I tapped F2 to go to bios to make sure it was detected, and then after 5-10 seconds the computer instantly shut down.
After this incident, my computer won't start at all when connecting the SATA power supply to the old HDD. If I connect only my new drive, it works without any problem. If I connect only my old drive, or both the old drive and the new one, and then push on the power button, the cpu fan simply rotates about 5 degrees and then stops.. and that's it, the computer doesn't start, and no sound from the PC speaker either.
Is there any way to recover my files from the old HDD and transfer them to my new one? I do not want to use the old HDD any more, I only need to save all my files.
This sounds very similar to an experience I had recently, where a SATA port went bad and took out my HDD interface board in the process.
I recommend first that you stop attempting to boot the computer with the damaged drive in-place. SATA is a hot-swappable technology and doesn't require the drive be connected at boot-time to be detected. This is one of the reasons SATA is better than old IDE ribbon drives. That said, you may need to go into the BIOS on your motherboard and enable hot-swapping on your SATA ports, as some come with this function disabled (my ASRock mobo came with it enabled, by my ASUS ROG board did not).
From there, connect a SATA cable you are certain is functional (as those can go bad as well) to the motherboard. You can test the existing one by moving it to another drive and seeing if a similar problem occurs. Boot the machine with only power plugged into the drive. Once the machine is running and boots to the OS (to bypass Windows chkdisk risks or potential Linux kernel panics), plug the cable into the back of the drive. The OS should detect the drive, one way or another.
To progress, you'll need to Google up some Free Data Recovery software. DriveDrill will retrieve 500mb of data before you have to buy it, and it's very thorough and priced reasonably if you need more, so I used that. This will scan the entire drive. The danger is that the interface board may be dead, which causes the scan to read every sector on the drive as bad and unretrievable. At this point, you are looking at either trying to solder on a new board from an identical drive or getting an identical drive and swapping the platters. Swapping hard drive platters is your last resort, and if it doesn't work or the drive has physical damage, you're done here.
In my case, I haven't swapped the platters yet because I lack the identical drive, but it's my next step. Thankfully, my drive was just the one that was full of old console emulators and copies of CDs for games I now own on Steam anyway. I hope your data wasn't anything irreplaceable, either.