When running my UpdatePSData.bat file, in each of my quote files, I am getting duplicate entries for Friday the 13th.
Example:
2026-03-13,48.830002,CU.TO
2026-03-13,48.830002,CU.TO
This causes the following return errors in psCheckFiles.txt
Quotes.csv. Date+Symbol should be unique - ERROR. Duplicate records:
I deleted the quotes.csv and restored the quotes folder from a backup I had on Feb 21 and ran the Update script again, and once again I received duplicates for Friday the 13th.
I then went to Yahoo, and sure enough, there are duplicate entries showing in the Yahoo historical data on their website.
Any suggestions?
Comments
I will investigate and will post here when I know solution.
Update script:
Scripts\GetQuotes-Yahoo.ps1 - updated code fixes the issue if Yahoo provides duplicate quotes.
Additional scripts:
Scripts\deduplicate-currExch.ps1
Scripts\deduplicate-quotes.ps1
deduplicate.bat
If you already have duplicate issues, please download updated scripts, copy these 4 files to the corresponding folders (note that .bat files go to the folder above Scripts), and then run deduplicate.bat.
Your fix worked perfectly! As always, your work is greatly appreciated.