If you file for bankruptcy while a foreclosure case is pending, your foreclosure case is going to stop. That’s because when you file for bankruptcy, you’ll be entitled to what is known as an automatic stay on your legal proceedings. However, the bankruptcy protection is to be used as a shield only. A lot of times people use it as a sword and use it as a way to stop their foreclosure case in bad faith. Do not do this or you might be subject to other penalties.