Which wallet are you using?
Bitcoin Core 0.11.2
the command is
dumpwallet you can use it from the terminal and you must give it a full path, e.g.
dumpwallet c:\mykeys.txtIf you have set a password you need to unlock the wallet first. The below command will unlock it for 60 seconds.
walletpassphrase PASSWORD 60They will be exported unencrypted(!) so be careful.