SQL Plus: how to change directory and show current working directory SQL Plus: how to change directory and show current working directory windows windows

SQL Plus: how to change directory and show current working directory


Try: host pwd and host cd somedir. You can also enter just host to get a command prompt.

Also, help is your friend.


The host command runs a subshell under unix. Thus, cd will change the directory in the subshell, but not for SQL*Plus itself.


Even I had the same issue. I tried to find the solution, but I settled down for a run.sql file solution. You can try some thing like this.

C:\Guru>Dir11/27/2009  10:29 AM    <DIR>          .11/27/2009  10:29 AM    <DIR>          ..09/02/2009  07:15 PM    <DIR>          fol09/02/2009  08.15 PM                   run.sql

In run.sql specify

@"c:\Guru\fol\a.sql"show error@"c:\Guru\fol\b.sql"show error

And so on. You can give the folder structure as you wish. Even you can put them into windows BATCH file and execute them in one click.