Question: I am currently announcing 8 /24 Subnets over BGP. I am planning to move our servers to a other datacenter, but i want to keep all IPs.

Is it possible that i announce the prefixes on 2 locations and tell that traffic from IP 1.1.1.1 should go to location A and traffic from IP 1.1.1.2 should go to location B?

There is no direct connection between the 2 datacenters, no traffic exchanger is possible. 

Location A isnt stable, there are nearly everyday network problems. Location B is stable and should not get disturbed because of location A.

I know i can announce the prefix on multiple locations, but then the shorter path will be used. I need a way to tell other routers that the IP X is on location A and IP Y is on location B. 

What would be the best way to perform this using BGP?

Answer: 
Possible script:

1. Move every /24 prefix in BGP one at a time.
2. Before moving the first /24 prefix, establish an IP tunnel between the two locations.
3. When you need to move one IP of a given /24 prefix, make location A to forward that address (a /32 route) thru the tunnel to location B.
4. As soon as every address from one /24 prefix is going to location B via tunnel, move its BGP prefix announcement from location A to B.
5. Repeat steps 3-4 for every /24 prefix.
6. Bring down the tunnel.
What you can do is advertise the prefix to a second ISP and then monitor if the prefix propagates to at least part of the rest of the world. (Some networks will prefer the path over your first ISP; this is normal.) Then ask your first ISP to stop advertising the prefix, and make sure that they propagate your own advertisement through them.