Depending on how old the movie looked, it could be a number of films. The first movie that popped in my head was The Convent from 2000. There's a scene similar to what you described in the clip below...