
simulate this circuit – Schematic created using CircuitLab
Hello everyone, I want the current to flow from A to B if the switch is pressed. What can I do here?
Total newbie here.
Thank you.
EDIT 1: Can't move the switch.

simulate this circuit – Schematic created using CircuitLab
Hello everyone, I want the current to flow from A to B if the switch is pressed. What can I do here?
Total newbie here.
Thank you.
EDIT 1: Can't move the switch.

simulate this circuit – Schematic created using CircuitLab
Figure 1. Rewire the switch as shown.
I assume that there is some reason you don't want to do this but you haven't explained it in your question.

Figure 2. (a) The simplest - unlikely to go wrong - solution. (b) A simple, no-component solution.
This is really hard to beat. Automotive relays come in insulated enclosures, take standard crimp terminals and are very robust.
This should solve it.
Feel free to substitute the transistor to any suitable P-MOSFET.

simulate this circuit – Schematic created using CircuitLab