Avatar of miyahira
miyahira
Flag for Peru asked on

Saving windows command prompt history to a file

Hello,
Is possible to save windows command prompt history to a file?
I'm going to work in sqlplus and would like to save in a log file all commands that were used and executed.
Example, would like to save all commads executed in a session:

C:\> sqlplus /nolog
sql> connect / as sysdba
sql> select * from v$version;
etc, etc

I tried to do before:
doskey /history >> C:\commands.log

But it does not record anything. I'm in a Windows Server 2008 64 bits.
Microsoft DOSWindows Server 2008

Avatar of undefined
Last Comment
ReneGe

8/22/2022 - Mon
ASKER CERTIFIED SOLUTION
kaufmed

THIS SOLUTION ONLY AVAILABLE TO MEMBERS.
View this solution by signing up for a free trial.
Members can start a 7-Day free trial and enjoy unlimited access to the platform.
See Pricing Options
Start Free Trial
GET A PERSONALIZED SOLUTION
Ask your own question & get feedback from real experts
Find out why thousands trust the EE community with their toughest problems.
ReneGe

You could also run it as a batch file like:
start "" thebatchfile.bat >>"Log File.log"
I started with Experts Exchange in 2004 and it's been a mainstay of my professional computing life since. It helped me launch a career as a programmer / Oracle data analyst
William Peck