Hello... Yes it will work, but safe, seems to be subjective to who, when, how and the lawyers, these days... The safest way would be a HOT-PLUG Drive Bay for your case... a ONE cable device would be called e-SATA, and is designed for the repeated plugging and un-plugging of drives, they have better cable shielding, as Standard and internal SATA cables are not designed for repeatable and flawless keyed connections...
You might want to find the internal SATA connector type that has the Power Plug molded together with the SATA flat cable, at the Drive end, for a "safer" repeatable keyed connection, they still can be found on-line and at your local computer re-cycler cable bins.
You might have to tell your Windows version, that a drive is a "hot plug device", or "hot plugging" is enabled in your security settings. And be aware that repeated use of the internal type SATA connectors is 'NOT' the best or robust solution over time... But it IS much cheaper and faster DATA transfer than USB connections.