A script to prepare Safari-downloaded Quicken files

This script was culled from the nether reigions of the Internet. I did not actually have anything to do with it’s creation. --Dan

Unfortunately, Quicken 2003 (and maybe 2004) won’t recognize QFX “Web Connect” files that you download with Safari 1.0. (Internet Explorer handles the files correctly).

Until now, you had two solutions: manually alter the QFX file type and creator codes, or use IE. In answer to this shortcoming, I’ve created a “folder action” script that automatically recognizes any file with a “qfx” extension, and changes the file type and creator codes for you.
Here’s what you do:
Copy and past the following AppleScript into your Script Editor and run it:
Save this as a “compiled script” with a name like QFX Fixer, and put it into your ~/Library/Scripts/Folder Action Scripts folder.
If your “script menu” isn’t running already (evident by the AppleScript icon in your menubar), go to your ~/Applications → AppleScript folder and double-click the “Script Menu.menu” folder. The AppleScript icon should appear in your menubar.
Under the Script Menu icon, find Folder Actions, and select “Attach Script to Folder”
A dialogue box will appear. Select the QFX Fixer script you saved above.
Another dialogue box will appear, asking to which FOLDER this script should be attached. Choose the folder to which Safari downloads.
Go back to the Script Menu, find Folder Actions, and select “Enable Folder Actions.”
Now, when using Safari to download a file with a .qfx extension, Folder Actions will take over, and convert the file automatically. A dialogue box will appear indicating a successful file conversion took place.

OS version: OS X

on adding folder items to this_folder after receiving added_items
  tell application "Finder"
    repeat with aFile in added_items
      if the name of aFile contains ".qfx" then
        set file type of aFile to "WBCN"
        set creator type of aFile to "INTU"
        display dialog ¬
        "Successfully changed .qfx file. Ready for import into Quicken."
      end if
    end repeat
  end tell
end adding folder items to