Skip to Main Content



For appeals, questions and feedback, please email

How to create a new folder when using apex export from SQLcl on a daily basis.

myluismFeb 15 2024

Hi all.

This example is from APEX Version but it would also apply for newer versions.

SQLcl version is lastest.

I need to create a script that would run on a daily basis and performs export of all applications from a particular workspace.

Test command is:

apex export -dir C:\Stage\apex_bkp -workspaceid XXXXXXX -split -expPubReports -expSavedReports -expIRNotif

This command is fine. It generates under -dir a folder for each application within the given workspace. However if I run this again or through a script, files will be rewritten for each run. I want to create a backup each time the backup job runs.

I would like know it there is an option to create a folder containing the date of backup and under that folder perform that backup.

I know i can create that folder when the script runs and then specify this as -dir option or simply cd to that new directory.

I'm used to using the deprecated APEXExport utility and with this option a new folder is created each time job runs.

Thanks in advance !!!

This post has been answered by myluism on Feb 22 2024
Jump to Answer
Post Details
Added on Feb 15 2024