I have to make an export from a banking app and I like to move the generated file, which is located somewhere deep inside of /tmp/..., to a folder inside documents.
tell application "MoneyMoney"
set exportFile to export transactions from account "DE91787695590008764648" from date "2022-01-01" to date "2022-12-31" as "csv"
end tell
tell application "Finder"
set fileName to name of (POSIX file exportFile as alias)
set targetName to "/Users/username/Documents/Klientendaten/AccountImport/" & fileName
move exportFile as POSIX file to folder targetName as POSIX file
end tell
return targetName
The script editor tells something with Error in AppleEvent-Routine number -10000. I think it has something to do with targetName, which apple script can't find, but that definitively exists. Is there a mistake in targetName
? Or is the move-call wrong?
exportFile
get assigned by the "MoneyMoney" app?