I am trying to open a password protected Rar file with cmd and when it asks for a password I want it to automatically insert the password stored in a text file. How can I do that?
I suppose WinRAR has CLI for that stuff:
unrar x -p your_password your_rar_file.rar
Instead of your_password
you can read from the file:
unrar x -p 'cat /path/to/passwdfile' your_rar_file.rar