Import from command line and quit

Andrew Koyfman's Avatar

Andrew Koyfman

02 Jun, 2026 02:56 PM

I am trying to write some basic shell scripts to import QFX files. What I'd like to be able to do is to run

/Applications/Moneydance.app/Contents/MacOS/Moneydance -nobackup AMEX.qfx

and have Moneydance import the transactions and exit on a succesful import. The import happens as expected, but I can't figure out how to have Moneydance quit after the import is done. Any suggestions / recommendations?

  1. 1 Posted by Stuart Beesley ... on 02 Jun, 2026 03:13 PM

    Stuart Beesley (Mr Toolbox)'s Avatar

    Probably need to use the invoke and quit parameter with an extension id. Dunno if that will work 🤷

  2. 2 Posted by Andrew Koyfman on 02 Jun, 2026 03:23 PM

    Andrew Koyfman's Avatar

    I was hoping someone had the actual command line I could use. I am not sure what to pass to -invoke_and_quit=fmodule:qfx didn't seem to do anything...

  3. 3 Posted by Stuart Beesley ... on 02 Jun, 2026 04:58 PM

    Stuart Beesley (Mr Toolbox)'s Avatar

    Actually, forget it. It won’t work. I just checked it out. Invoke and quit will quit before files are imported. My only thought is whether you can use an extension like file importer and invoke and quit on that. I would need to check it out for you, but I can’t do this right now.

  4. 4 Posted by Stuart Beesley ... on 02 Jun, 2026 04:59 PM

    Stuart Beesley (Mr Toolbox)'s Avatar

    I agree - it would be nice to have a quit after import parameter.

  5. 5 Posted by Stuart Beesley ... on 02 Jun, 2026 09:41 PM

    Stuart Beesley (Mr Toolbox)'s Avatar

    PS. For the record. The format for the parameter is:

    -invoke_and_quit=moneydance:fmodule:extract_data:hello
    

    In this example, extract_data is the extension id and hello is the command. Of course, the command has to be known by the extension to work.

    Extract data has these options:

    -d [datasetpath] -invoke=moneydance:fmodule:extract_data:autoextract:noquit
    -d [datasetpath] -invoke=moneydance:fmodule:extract_data:autoextract:quit
    

    QuoteLoader responds to this:

    -invoke=moneydance:fmodule:securityquoteload:runstandalone:quit
    

    You’ll note that these extensions accept a command and then trigger quit themselves, rather than using the invoke and quit parameter.

    Just for info.

  6. 6 Posted by Stuart Beesley ... on 03 Jun, 2026 10:03 AM

    Stuart Beesley (Mr Toolbox)'s Avatar

    Update. It seems that ‘importfile’ has been setup as a command. Try this.

    -invoke_and_quit "moneydance:importfile?<file-to-import>”
    -invoke_and_quit=moneydance:importfile:<file-to-import>
    

    Or something like that. Let me know.

  7. 7 Posted by Andrew Koyfman on 03 Jun, 2026 04:39 PM

    Andrew Koyfman's Avatar

    Weirdly it only half-works... and I've been running a bunch of tests here. One note for anyone trying to replicate, it looks like Moneydance needs the absolute file name.

    So, here's what works, but doesn't quit moneydance.

    /Applications/Moneydance.app/Contents/MacOS/Moneydance /Users/andrewk/Playwright/AMEX.qfx  -nobackup
    
    In my case this loads 3 new transactions for me to reconcile

    This also seems to work (though takes a lot longer to complete (and doesn't quit)

    /Applications/Moneydance.app/Contents/MacOS/Moneydance -invoke=moneydance:importfile:/Users/andrewk/Playwright/AMEX.qfx  -nobackup
    
    again this loads the file 3 new transactions.

    Now if I try to do the recommended action, it seems to quit too early, before the transactions are actually processed

    /Applications/Moneydance.app/Contents/MacOS/Moneydance -invoke_and_quit=moneydance:importfile:/Users/andrewk/Playwright/AMEX.qfx  -nobackup
    
    It quits, but the transactions never get loaded into the file. Just looking at the output in the window, it looks like it never gets to the actual processing of the new transactions...
  8. 8 Posted by Stuart Beesley ... on 03 Jun, 2026 04:45 PM

    Stuart Beesley (Mr Toolbox)'s Avatar

    I feared it might quit too early. That is a common problem with the quit bit. I’ll look deeper when I get time.

Reply to this discussion

Internal reply

Formatting help / Preview (switch to plain text) No formatting (switch to Markdown)

Attaching KB article:

»

Attached Files

You can attach files up to 10MB

If you don't have an account yet, we need to confirm you're human and not a machine trying to post spam.

Keyboard shortcuts

Generic

? Show this help
ESC Blurs the current field

Comment Form

r Focus the comment reply box
^ + ↩ Submit the comment

You can use Command ⌘ instead of Control ^ on Mac