There is no doubt that bats cannot see in dark. But still they can detect the obstacles that come in their way. They manage to do so by the technique of SONAR or echolocation. Bats wait for the echo of the sound that has been released by them. This echo is produced as the sound released by the bats hits any obstacle in the way. Bats take into account the time taken by the echo to reach them and thus estimate the distance of the obstacle. Thus, this is how bats manage to save themselves from obstacles when its dark.