CLI 範例:尋找並取代目錄文字

您可以使用 Catalog Manager 命令行介面,以程式設計方式尋找並取代目錄物件的文字。例如,您可以撰寫一個命令檔來重新命名目錄中的資料夾、檔案、工作簿以及其他物件。

用於尋找並取代文字的語法

runcat.sh -cmd replace -online <Oracle Analytics Cloud URL> 
-folder <root folder to start find> 
textreplace -old "<string to replace> -new "<new string>" 
-credentials <file with login username and password>

範例

在本範例中,您將目錄資料夾 Revenue 重新命名。新資料夾名稱為 Sales Reports

runcat.sh -cmd replace -online "https:/myoac.ocp.oraclecloud.com/analytics-ws" -folder "/Shared Folders/North America" textreplace -old "/Shared Folders/North America/Revenue" -new "/Shared Folders/North America/Sales Reports" -credentials /scratch/mycredentials.txt

其中,證明資料檔案包含以下資料列:

login=<userid>
pwd=<password>