Jump to content
Ketarin forum

Is there still no way to automatically export commands to an xml?


Recommended Posts

I have made a script that checks for directories and makes them if they are not present. Then exports and backs up the apps list and copies the Database file to a backup folder. Also creates a log file in the Backup directory. I also would like to export the commands to an xml to make a backup. I see you can export the commands manually to a file. Is there no command to do this automatically?

Here are the PowerShell commands I am currently using. 

$directoyPath="Backup";
if(!(Test-Path -path $directoyPath))  
{  
    New-Item -ItemType directory -Path $directoyPath      
}

$directoyPath=".\Backup\Database";
if(!(Test-Path -path $directoyPath))  
{  
    New-Item -ItemType directory -Path $directoyPath      
}

$directoyPath=".\Backup\CommandsExport";
if(!(Test-Path -path $directoyPath))  
{  
    New-Item -ItemType directory -Path $directoyPath      
}

$directoyPath=".\Backup\ExportAppList";
if(!(Test-Path -path $directoyPath))  
{  
    New-Item -ItemType directory -Path $directoyPath      
}

$directoyPath=".\Backup\Logs";
if(!(Test-Path -path $directoyPath))  
{  
    New-Item -ItemType directory -Path $directoyPath      
}

Copy-Item -Force -Recurse -Verbose '~\AppData\Roaming\Ketarin\jobs.db' '.\Backup\DataBase\jobs'

Start-Process ketarin.exe {/export=Backup\ExportAppList\ExportList.xml /log=Backup\Logs\Logfile.txt}

 

Link to post
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

Loading...
×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.