Copy the following code into a file called "WrapDirectory.cmd".
@ECHO OFF
TITLE Wrap Directory
SET /p src="Enter Source Directory...: "
SET ora=E:\Oracle\DB10
IF NOT EXIST %src%\Wrapped MKDIR %src%\Wrapped
TITLE Wrapping Directory
FOR %%F IN (%src%\*.sql) DO CALL %ora%\Bin\WRAP INAME=%%F ONAME=%%~dpF\Wrapped\%%~nF.plb >> %%~dpF\Wrapped\wrap.log
TITLE Wrapped Directory
PAUSE
TITLE Wrap Directory
SET /p src="Enter Source Directory...: "
SET ora=E:\Oracle\DB10
IF NOT EXIST %src%\Wrapped MKDIR %src%\Wrapped
TITLE Wrapping Directory
FOR %%F IN (%src%\*.sql) DO CALL %ora%\Bin\WRAP INAME=%%F ONAME=%%~dpF\Wrapped\%%~nF.plb >> %%~dpF\Wrapped\wrap.log
TITLE Wrapped Directory
PAUSE
The Oracle home directory needs to be configured to your own home, before it can be run. It can also be easily modified to wrap files other than ".sql" which it currently does.
This has been been written and tested against Oracle 10g.
PLSQL Files... Wrapped.
No comments:
Post a Comment