# No more EXP= in command-line; quick and easy export is gone?

**URL:** <https://forums.toadworld.com/t/no-more-exp-in-command-line-quick-and-easy-export-is-gone/31885>\
**Category:** Toad for Oracle & DevOps Toolkit\
**Created:** [November 27, 2014, 11:18am UTC](https://forums.toadworld.com/t/no-more-exp-in-command-line-quick-and-easy-export-is-gone/31885 "2014-11-27T11:18:45Z")\
**Posts on this page:** 5\
**Page:** 1

<div class="post-metadata">

**Author:** ![Tom\_Warfield](https://avatars.discourse-cdn.com/v4/letter/t/8e7dd6/32.png) [@Tom\_Warfield](https://forums.toadworld.com/u/Tom_Warfield)\
**Post date:** [November 27, 2014, 11:18am UTC](https://forums.toadworld.com/t/no-more-exp-in-command-line-quick-and-easy-export-is-gone/31885/1 "2014-11-27T11:18:45Z")

</div>

Below is a batch file that I used to use, to quickly and easily create tab delimited files from tables, views, or even queries using Toad v8.1. The batch file creates an export specification file using the table/view name, then logs into Toad using the “EXP=” command-line switch to export the data. I got a lot of use out of this batch file; I had alternate versions for .CSV comma-delimited files and for .XLS Excel files.

Unfortunately, we recently upgraded from v8.1 to v12.x and the “EXP=” command line switch is no longer available. Now there doesn’t seem to be any way to duplicate this functionality. I looked at using an “action” with the -a switch, but the “Automation Designer” doesn’t seem to allow any way to pass in a table name. This means we need to create a separate action, using a lot of pointing-and-clicking, anytime we have a new table to export.

I don’t understand why the EXP= switch was discontinued, especially if the functionality it provided is not available any other way. Please tell me I am wrong, or I’m missing something? If not, I wish you would bring EXP= back.

toad\_tab\_export.bat:  
echo off  
if not %5.==. goto :start

echo. Usage:  
echo. %~n0 [schema] [password] [instance] [table] [output\_file] [[quotes]]  
pause  
goto :EOF

:start

set toad\_exe=“C:\Program Files\Quest Software\Toad for Oracle\TOAD.exe”

if exist temp\_toad\_export\_spec\_file.txt del temp\_toad\_export\_spec\_file.txt  
if exist temp\_toad\_export\_spec\_file.txt echo Error: Couldn’t delete existing file temp\_toad\_export\_spec\_file.txt&goto :EOF

echo FORMAT=DELIM \>temp\_toad\_export\_spec\_file.txt  
echo DELIMINT=9 \>\>temp\_toad\_export\_spec\_file.txt  
echo CELLBORDERS=NO \>\>temp\_toad\_export\_spec\_file.txt  
echo DELIMAFTERROW=NO \>\>temp\_toad\_export\_spec\_file.txt  
echo COMMIT=0 \>\>temp\_toad\_export\_spec\_file.txt  
echo QUOTES=%6 \>\>temp\_toad\_export\_spec\_file.txt  
echo COLUMNS=YES \>\>temp\_toad\_export\_spec\_file.txt  
echo LOWERCASECOLUMNS=NO \>\>temp\_toad\_export\_spec\_file.txt  
echo NULLS=NO \>\>temp\_toad\_export\_spec\_file.txt  
echo COMPRESS=NO \>\>temp\_toad\_export\_spec\_file.txt  
echo UNIXFORMAT=NO \>\>temp\_toad\_export\_spec\_file.txt  
echo INCSQL=NO \>\>temp\_toad\_export\_spec\_file.txt  
echo NOWRAP=NO \>\>temp\_toad\_export\_spec\_file.txt  
echo OUTPUTDIR=%CD%\ \>\>temp\_toad\_export\_spec\_file.txt  
echo BEGINQRY %CD%%5 \>\>temp\_toad\_export\_spec\_file.txt  
echo SELECT \* FROM %4 \>\>temp\_toad\_export\_spec\_file.txt  
echo ENDQRY \>\>temp\_toad\_export\_spec\_file.txt  
echo CLOSETOAD \>\>temp\_toad\_export\_spec\_file.txt

start /wait “Toad Export” %toad\_exe% connect=%1/%2@%3 EXP=temp\_toad\_export\_spec\_file.txt

Regards,

-Tom Warfield

---

<div class="post-metadata">

**Author:** ![damir.vadas\_250](https://sea1.discourse-cdn.com/quest/user_avatar/forums.toadworld.com/damir.vadas_250/32/37_2.png) [@damir.vadas\_250](https://forums.toadworld.com/u/damir.vadas_250)\
**Post date:** [November 28, 2014, 6:25am UTC](https://forums.toadworld.com/t/no-more-exp-in-command-line-quick-and-easy-export-is-gone/31885/2 "2014-11-28T06:25:21Z")

</div>

just to understand…

you are saying that command doesn’t work on the same database and only change is Toad 8.1-\>12.x?

Or you have also changed database as well (are you using maybe 12c database)?

Brg

Damir

---

<div class="post-metadata">

**Author:** ![Tom\_Warfield](https://avatars.discourse-cdn.com/v4/letter/t/8e7dd6/32.png) [@Tom\_Warfield](https://forums.toadworld.com/u/Tom_Warfield)\
**Post date:** [December 1, 2014, 4:05am UTC](https://forums.toadworld.com/t/no-more-exp-in-command-line-quick-and-easy-export-is-gone/31885/3 "2014-12-01T04:05:13Z")

</div>

Same database, just changed Toad version.

I am talking about the EXP= command line switch that used to be available in TOAD.EXE - not to be confused with Oracle EXP utility.

-TW

---

<div class="post-metadata">

**Author:** ![JohnDorlon](https://sea1.discourse-cdn.com/quest/user_avatar/forums.toadworld.com/johndorlon/32/9997_2.png) [@JohnDorlon](https://forums.toadworld.com/u/JohnDorlon)\
**Post date:** [December 1, 2014, 7:51am UTC](https://forums.toadworld.com/t/no-more-exp-in-command-line-quick-and-easy-export-is-gone/31885/4 "2014-12-01T07:51:03Z")

</div>

Most action types have a way to specify a parameter file for things like this, but I see that parameter files are not supported for export dataset. This was an oversight and I just added it for the next beta.

So, when the next beta comes out, you can right-click on an action and choose “create parameter file”. Then you can edit that file and run the action using that file. To run the action from command prompt, using the parameter file, the command would look something like this:

toad.exe -a “App-\>Export Dataset1 | c:\Export Dataset1.ini”

---

<div class="post-metadata">

**Author:** ![Tom\_Warfield](https://avatars.discourse-cdn.com/v4/letter/t/8e7dd6/32.png) [@Tom\_Warfield](https://forums.toadworld.com/u/Tom_Warfield)\
**Post date:** [December 1, 2014, 8:39am UTC](https://forums.toadworld.com/t/no-more-exp-in-command-line-quick-and-easy-export-is-gone/31885/5 "2014-12-01T08:39:18Z")

</div>

That is fantastic news, thank you very much - I’ll look out for the next version.

-TW
