Hi
wondering why
-- these do not work
do shell script "defaults export com.manytricks.Moom '~/Dropbox (Personal)/Automation Syncs/Moom/'moom.plist"
or
do shell script "defaults export com.manytricks.Moom '~/Dropbox (Personal)/Automation Syncs/Moom/moom.plist'"
where as
-- This works
do shell script "defaults export com.manytricks.Moom ~/'Dropbox (Personal)'/'Automation Syncs'/Moom/Moom.plist"
The script
--============================================—
# dCre: 2021-Oct-02 @ 16:10
# URL : https://manytricks.com/osticket/kb/faq.php?id=53
# dMod:
# Appl: Backup or restore setting
# Libs: None
# Tags: @Moom @shell @BackUp @Restore
----------------------------------------------------------------
-- Set Up BackUp Folder
set BackUpFolder to "~/Dropbox (Personal)/Automation Syncs/Moom/Moom.plist"
-- Set up ProcedureList
set ProcedureList to {"BackUp", "ReStore"}
set chosenOption to choose from list of ProcedureList with prompt "what you want to do, please select:"
if chosenOption is false then
error number -128 (* user cancelled *)
else
set chosenOption to chosenOption's item 1 (* extract choice from list *)
end if
if chosenOption is "BackUp" then -- Has export command
do shell script "defaults export com.manytricks.Moom" & quoted form of BackUpFolder
else if chosenOption is "ReStore" then -- has import command
do shell script "defaults import com.manytricks.Moom" & quoted form of BackUpFolder
end if
--============================================—