F2O - "installation" into non-default folder

55 views
Skip to first unread message

Dan Battagin

unread,
Feb 10, 2026, 8:18:24 PMFeb 10
to Microsoft Money
Is there a config setting that I can change to allow me to install F2O into 

%USERPROFILE%\OneDrive\Microsoft Money\F2O?

Currently I have all my Money stuff under that Microsoft Money\ root, and would like to keep my Documents folder "uncluttered" if possible.

Reading through the docs here (https://microsoftmoneyoffline.wordpress.com/2024/02/03/cals-fidelity-specific-csv-to-ofx-converter/) I see that there's a config for these:
* OVERRIDE_WRITE_FOLDER
* OVERRIDE_HISTORY_FILES
* OVERRIDE_POSITIONS_FILES
 
... but I don't see anything for the root folder. Also not sure that anything is necessary, but I do see %USERPROFILE%\documents\F2O splashed about in various bat and py files.

I'd also be fine if the answer is "not yet" or "run it out of Documents when setting everything up, and then you can move it."

Thanks to Dan and Cal for all the hard work here.

Cheers,
Dan

Ameridan (microsoftmoneyoffline.wordpress.com)

unread,
Feb 10, 2026, 8:37:04 PMFeb 10
to Microsoft Money
F2O isn't "installed" per se, the files are simply copied into a convenient folder, so in your case, perhaps:  %USERPROFILE%\OneDrive\F2O
Then, if you have a desktop shortcut, it simply points to  %USERPROFILE%\OneDrive\F2O\F2O.bat

Dan Battagin

unread,
Feb 11, 2026, 12:11:59 AMFeb 11
to Microsoft Money
Gotcha. I was thrown off by f2.bat which hardcodes the /Documents/F2O path, but that's probably just a utility script for you and in your path.

Thanks for the quick reply. Going to try to get this working tonight with some Fidelity OFXs from 1/17, which looks like the last time I happened to update (and luckily they appear to have all the data in them). Also have some from 12/24/25 in case the 1/17 don't work.

Dan Battagin

unread,
Feb 11, 2026, 12:22:46 AMFeb 11
to Microsoft Money
OK, just tried running make_new_F2O_DBgather.bat.bat and it spit out:

The expected C:\Users\Dan Battagin\documents\F2O folder does not exist.
Did you use zero rather than oh (F20 vs F2O)?
Nothing done.


So, looks like - at least to run the initial config/migration, I need to use the default path. Maybe after that, it doesn't rely on being "installed" to a specific location.

Cal Learner

unread,
Feb 11, 2026, 12:47:15 AMFeb 11
to Microsoft Money

So, looks like - at least to run the initial config/migration, I need to use the default path. Maybe after that, it doesn't rely on being "installed" to a specific location.
I expect you are right. Gather is only run once typically, but could be run again if you find additional fidelity*.ofx files.

 I wrote Gather earlier and Gather does not have OVERRIDE_ stuff. Only F2O.py has the F2O_cfg.py and OVERRIDEs.

After doing the Gather, you could move the  whole F2O folder to %USERPROFILE%\OneDrive\Microsoft Money\ 

I suggest people keep a copy of their F2O folder as a backup, perhaps in a zip file. Maybe keep a copy of that zip file on a USB flash drive.

Make sure when running the F2O.py that the working folder is the folder with the F2O files in it. If you use a command window, as I do, you could use a CD command at the start of the batch file. Windows shortcuts have a "Start in:" field, which I think works like a CD in a batch file.

Dan Battagin

unread,
Feb 11, 2026, 12:48:16 AMFeb 11
to Microsoft Money
Couple other things I noticed during "install"/"config"

make_new_F2O_DBgather.bat.bat
  • the path on line 3  needs to be quoted in case the username (like mine) has spaces.
    • if exist %USERPROFILE%\documents\F2O goto cont1 ---> if exist "%USERPROFILE%\documents\F2O" goto cont1
  • looks like the script only looks in c:\xfr for the xfr folder, so it needs to be moved or copied there prior to running the script
When I was done running make_new, I had a F2O_DBgather.bat with the following:

cd "%USERPROFILE%\documents\F2O"
python F2O_DBgather.py "c:\xfr\CITIMCDAN10320260117230204681619.ofx" %1

That didn't seem right b/c the ofx file it choose wasn't even a Fidelity file, but I went with it. Ran the F2O_DBgather.bat and got the following output:

F2O F2O_DBgather.py  Dated 2026/2/1 improved2
arg ends with ofx
Ran F2O_DBgather.py
  to process files @  c:\xfr\CITIMCDAN10320260117230204681619.ofx
    and updated "F2O_DB.csv" file.

So, seems like it expects a single Fidelity ofx file. I have the following (b/c I have many accounts):

C:\xfr>dir
 Volume in drive C is Windows
 Volume Serial Number is 8EA0-E942

 Directory of C:\xfr

02/10/2026  09:41 PM    <DIR>          .
01/17/2026  11:02 PM               891 CITIMCDAN10320260117230204681619.ofx
01/17/2026  11:07 PM               891 CITIMCDAN10320260117230725461785.ofx
01/17/2026  11:08 PM               891 CITIMCDAN10320260117230838691712.ofx
01/18/2026  06:27 PM            10,241 CITIMCDAN10320260118182703206661.ofx
01/17/2026  11:02 PM            33,325 FIDELITYADVENTURETACO20260117230207644061.ofx
01/17/2026  11:02 PM            15,062 FIDELITYCASHMGMNTDAN20260117230208294123.ofx
01/17/2026  11:02 PM             7,376 FIDELITYDAN20260117230210415745.ofx
01/17/2026  11:02 PM            18,112 FIDELITYDAN20260117230210559656.ofx
01/17/2026  11:02 PM            16,924 FIDELITYDANROTHIRA20260117230211444751.ofx
01/17/2026  11:02 PM             5,318 FIDELITYDANSEPIRA20260117230212646923.ofx
01/17/2026  11:02 PM             5,766 FIDELITYDANTRADIRA20260117230212486105.ofx
01/17/2026  11:02 PM             2,062 FIDELITYMSFTDCPDAN20260117230213309134.ofx
01/17/2026  11:02 PM            13,766 quotes.htm
01/17/2026  11:02 PM            18,916 quotes20260117230217613737.ofx


So, now I'm stuck.

Help please :)

-d

Dan Battagin

unread,
Feb 11, 2026, 1:07:40 AMFeb 11
to Microsoft Money
Ignore my last, I cracked open F2O_DBgather.py and was able to continue by modifying the  F2O_DBgather.py to be:

cd "%USERPROFILE%\documents\F2O"
python F2O_DBgather.py "c:\xfr" %1

That got me a good (non-0 byte and appears to have my securities in it) F2O_DB.csv

Will keep going and post up anything else I find as part of setup/config.

Cal Learner

unread,
Feb 11, 2026, 1:14:25 AMFeb 11
to Microsoft Money
I expect to look into some of this tomorrow. I do have a few comments.
make_new_F2O_DBgather.bat.bat makes a batch file to invoke F2O_DBgather.py with parameters based on a search.

That batch file includes this:
dir c:\xfr /s /b
The /s tells the dir to search thru subdirectories, and since we started  at c:\ it searches the whole C: drive. You can also look at the produced batch file for an example of what the parameters (arguments) for F2O_DBgather.py are.

An argument for F2O_DBgather.py can specify a file or a folder. I was thinking I only searched for fidelity*.ofx files if you specify a folder/directory, but based on your findings, that would appear to not be the case. I hope to look into that. 

To start running F2O_DBgather.py again, and disregard what it found earlier, I would copy F2O_DB.csv.seed   F2O_DB.csv  if using a command window, or do the equivalent if not using a command window. That would overwrite what your previous gather did.

Dan Battagin

unread,
Feb 11, 2026, 1:45:45 AMFeb 11
to Microsoft Money
Hope you saw my "ignore my last." I got through the gather stage. The problem with  make_new_F2O_DBgather.bat.bat is that the batch file doesn't search at c:\, it searches c:\xfr. Since my xfr directory is in c:\users\Dan Battagin\OneDrive\Microsoft Money\pocketsense\xfr, it never found it. However, I looked at the output and figured out what was "expected" to be in F2O_DBgather.bat (I called that F2O_DBgather.py in my previous email) and update it to contain:

cd "%USERPROFILE%\documents\F2O"
python F2O_DBgather.py "c:\xfr" %1


Which got me to a totally valid F2O_DB.csv

SPAXX,31617H102,MF,FIDELITY GOVERNMENT MONEY MARKET
FXAIX,315911750,MF,FIDELITY 500 INDEX FUND
FDRXX,316067107,MF,FIDELITY GOVERNMENT CASH RESERVES
MSFT,594918104,STOCK,MICROSOFT CORP
VOO,922908363,STOCK,VANGUARD INDEX FUNDS S&amp;P 500 ETF USD
VBK,922908595,STOCK,VANGUARD SMALL
VTI,922908769,STOCK,VANGUARD INDEX FDS VANGUARD TOTAL STK MKT ETF
MA,57636Q104,STOCK,MASTERCARD INCORPORATED CL A
V,92826C839,STOCK,VISA INC
UMMW,UMMW,MF,VANG INST INDEX PLUS


However, my next step was running F2O.bat (which invokes F2O.py), and now I get the following output:

C:\Users\Dan Battagin\Documents\F2O>F2O.bat
F2O Fidelity-specific CSV 2 OFX converter  Dated 2026/2/9 beta13E
Traceback (most recent call last):
  File "f2o.py", line 19, in <module>
    from dateutil.parser import parse
ImportError: No module named dateutil.parser
Python detected an error during execution of f2o.py program. Note error message above.


To address that, I ran this, which seemed to work:

python.exe -m pip install --upgrade python-dateutil

Then, ran f2o.bat again, which invoke f2o.py and I get the following output:

C:\Users\Dan Battagin\Documents\F2O>python f2o.py
F2O Fidelity-specific CSV 2 OFX converter  Dated 2026/2/9 beta13E
Fidelity csv 2 Ofx converter

********FATAL F2O ERROR********
F2O needs at least one Accounts_History and Portfolio_Positions file from Fidelity
Go to the Fidelity web page, and download the CSV file from the Positions and Activity web pages.
Take the defaults, and that will put the files in the Downloads folder, where F2O defaults to looking.
Then come back and try F2O again.
No need to delete or rename these files between downloads. Relax. Take defaults.
Press the Enter key to exit.
Press Enter to continue...

I've downloaded both Accounts_History.csv and Portfolio_Positions.csv into my Downloads folder, and also into the folders I configured in F2O_cfg.py:

IGNORE_BEFORE_YYYYMMDD="20260118"
DEBUG=0
OVERRIDE_WRITE_FOLDER="%USERPROFILE%/OneDrive/Microsoft Money/pocketsense and popdown (May 2023)/xfr"
OVERRIDE_HISTORY_FILES="%USERPROFILE%/OneDrive/Microsoft Money/F2O Data/csv-history"
OVERRIDE_POSITIONS_FILES="%USERPROFILE%/OneDrive/Microsoft Money/F2O Data/csv-positions"


At this point, not really sure where to go, since it seems that I have the files in all the right places.

Thanks again; headed to bed for tonight, but happy to keep going tomorrow.

Cal Learner

unread,
Feb 11, 2026, 7:02:36 AMFeb 11
to Microsoft Money
I've downloaded both Accounts_History.csv and Portfolio_Positions.csv into my Downloads folder, and also into the folders I configured in F2O_cfg.py:

Make sure the https://digital.fidelity.com/ftgw/digital/portfolio/positions and https://digital.fidelity.com/ftgw/digital/portfolio/activity pages are set to
 "All accounts" in the left column before the CSV downloads. All accounts is the initial default, but  a previous change to a single account may be a bit sticky.

IGNORE_BEFORE_YYYYMMDD="20260118"
DEBUG=0
OVERRIDE_WRITE_FOLDER="%USERPROFILE%/OneDrive/Microsoft Money/pocketsense and popdown (May 2023)/xfr"
OVERRIDE_HISTORY_FILES="%USERPROFILE%/OneDrive/Microsoft Money/F2O Data/csv-history"
OVERRIDE_POSITIONS_FILES="%USERPROFILE%/OneDrive/Microsoft Money/F2O Data/csv-positions"

For some reason the environment variable %USERPROFILE% does not work in this case. Sorry. Plus I think the trailing slash is needed.  Please change OVERRIDE_ lines to 

OVERRIDE_WRITE_FOLDER="C:/Users/Dan Battagin/OneDrive/Microsoft Money/pocketsense and popdown (May 2023)/xfr/"
OVERRIDE_HISTORY_FILES="C:/Users/Dan Battagin/OneDrive/Microsoft Money/F2O Data/csv-history/"
OVERRIDE_POSITIONS_FILES="C:/Users/Dan Battagin/OneDrive/Microsoft Money/F2O Data/csv-positions/"

Cal Learner

unread,
Feb 11, 2026, 8:49:37 AMFeb 11
to Microsoft Money
I pretty much screwed up F2O_risky_info.txt, and caused extra work and stress. That file been written in haste as an afterthought.  I have revised the F2O_risky_info.txt file. I just uploaded F2O_beta13F.zip with the revised text.

Please comment on how to make this better.

=========replacement F2O_risky_info.txt=========
There are some options to change where F2O looks for Accounts_History, Portfolio_Positions

1. I strongly suggest against it, especially for the CSV files, for reasons:
   a. Taking the defaults is easier for downloading.
   b. Having a unified location makes documentation easier to write and read.

However  you can override the defaults of F2O.py. The defaults are looking into the Download folder for 'Accounts_History*csv' and  Portfolio_Positions*csv'. Those match the default place and names for the downloaded files from Fidelity. The default place to write the output Fid*.ofx files is the current folder. Overriding that to put the output elsewhere, such as the import folder of PocketSense, could be useful after you know things are working well.

If for some reason, you want your own place and/or filename pattern for positions CSV file there is provision. Suppose the username is T. If into the F2O_cfg.py you add this line, you would override the defaults:
POSITIONS_FILE='C:/Users/T/Documents/MySpecialPlace/Fidelity_*.csv'
Note the use of  forward slashes instead of the usual windows backslashes

2. Similarly, there are OVERRIDE_HISTORY_FILES and OVERRIDE_WRITE_FOLDER  configuration items that can go into F2O_cfg.py too. The F2O_cfg.py file is optional and the contents are optional.

Again  using forward slashes instead of the usual windows backslashes*:

OVERRIDE_WRITE_FOLDER='C:/Users/T/Documents/MN/ofx_frame/temp/'

3. DEBUG=2
  or other DEBUG value could go there too. Default is DEBUG=0.
  DEBUG=1 will add some more printing to the screen while F2O.py runs.
  DEBUG=2 or higher will invoke the Python debugger, and you will have to enter c to continue.

4. Mistakes in that file could do bad things. You have been warned.

5. On the other hand, I recommend something like "IGNORE_BEFORE_YYYYMMDD="20260117" to everybody. That date is special since the last downloads directly from Fidelity could have had transactions dated as late as January 16 (<DTTRADE>20260116120000). This prevents duplicate transactions. Duplicates generated by F2O should not be a problem, because F2O generates an <FITID> that should be the same each time, as long as the history CSV line is the same for the same transaction.

2026/2/11 Cal Learner.

footnote:
* These would also work, but I picked the use of forward slash with no r to be easier.
 OVERRIDE_WRITE_FOLDER='C:/Users/T/Documents/MN/ofx_frame/temp/'
 OVERRIDE_WRITE_FOLDER=r'C:\\Users\\T\\Documents\\MN\\ofx_frame\\temp\\'
 OVERRIDE_WRITE_FOLDER=r'C:/Users/T/Documents/MN/ofx_frame/temp/'
 OVERRIDE_WRITE_FOLDER='C:\\\\Users\\\\T\\\\Documents\\\\MN\\\\ofx_frame\\\\temp\\\\'
 OVERRIDE_WRITE_FOLDER='C:\\\\Users\\\\T\\\\Documents\\\\MN\\\\ofx_frame\\\\temp/'

 While these examples used single quotes ('), double quotes (") for both quotes would be equivalent.

Reply all
Reply to author
Forward
Message has been deleted
0 new messages