Electrical – Old wiring in house has cable with 2 white wires and one black. Trying to install new ceiling fan

ceiling-fanelectrical

I'm trying to wire in a new ceiling fan. The ceiling has two cables, looks like a switch loop.

Both cables have two white wires and one black. Both black wires are bundled together and two white wires are. This leaves two white wires, one from each cable, loose.

One is definitely hot coming from the switch.

Can i use that wire as my hot and the other loose wire as my neutral while wiring in the new fan?

enter image description here

Best Answer

In the absence of any fuether detail, the wires you disconnected from whatever used to be installed are the wires that you should connect to your new fan.

That wire looks to be in poor condition, you should consult an electrician to verify it is safe.