Wiring a new ceiling light and switch from an existing power source from what has been described in this question it appears that a neutral wire is not available at the wall switch.
Wiring ceiling light with wall switch.
Second remove the light fixture in the room.
Before doing any electrical work always shut off power to the house at the main breaker.
You can install a ceiling fan with a light in a room with a single light switch with a simple wiring trick.
Mark this wire black.
Then splice the fixture s black lead into the new black wire.
When the toggle is flipped down the circuit is broken and the power goes off.
After removing the black wire to the fixture s lead splice it into the new white wire.
It should be 48 from the floor.
A single pole wall switch usually has a lever or toggle that completes the circuit when it is flipped up to turn a light device or appliance on.
Make sure the box is rated for a ceiling fan.
To wire the ceiling fixture to the new wall switch first connect the copper grounding wire to the fixture.
Align these with the black and white wires from the power source cable coming from the wall switch through the junction box and ceiling plate.
Match the wires black to black and white to white.
Cut out the traced hole with an oscillating saw.
First turn off power to the fixture at the electrical panel.
The ceiling light fixture requires a neutral for the light to work and your wall switch box does not have a neutral wire available so additional wiring will be required to obtain the neutral wire from the outlet.