I must assume that you have an anti virus program installed and it did not catch the virus you got. I have had this issue with MS Security essentials as well as the old Norton's and McCaffee. I solved the issue by downloading the free version of "Malwarebytes" available via malwarebytes.org or CNET Download. This will allow a quick or full scan of the drive you specify. This application has saved me many times. Try it - you got nothing to loose.
what can be done to clean a external hard drive with a virus.It's a it-ceo 500gb hard drive
If you have important files inside, you should find a free hard drive recovery program to get your files out of this drive.
If you do not have important files inside, you could straightly format it to clean your drive completely. Note:
1. Stop writing anything new on the same drive to avoid original data overwritten by new data, which can make your data gone permanently.
2. Save your recovered data on a different drive in case of recovery failure.
3. Not forget to format this drive after recovery process.
4. Run the anti-virus scan regularly in the future.
5. Back up your data regularly in the future.