Your approach will have to depend on the file. If it's just a password that allows you to continue or not, you can bypass it with reverse engineering methods. But if the file is encrypted, and you have to enter the key to decrypt it's contents correctly, you'll HAVE to get the password for it somehow.
In the case of it being possible to enter the password from the command prompt, I would suggest writing a nice easy script to just try a word list, or a brute force attack. (Depending on the encryption used, this may or may not be feasible as an encryption with a heavy penalty factor will simply take too long.)