PDA

View Full Version : Race File question


Handiman
04-09-2016, 06:02 AM
For you guys that download files everyday from a vendor, where and how do you store those files on your hard drive? I'm tinkering around with a batch processing program and I am trying to figure out how to have one program access files of a gazillion different computers. Ok maybe not a gazillion but a few anyway...:lol:

ie; Do you separate by year or month or by track or maybe by date?

Sure could use some input.

Thanks,
Handi:)

Augenj
04-09-2016, 08:16 AM
After downloading daily compressed/encrypted files, I convert them into CSV files which are readable by spreadsheets and my home-grown programs.

At the end of the week, they get appended to history files named like this:

ttt_ccyy-mm-dd_ccyy-mm-dd.DB.txt

ttt - track acronym
ccyy-mm-dd - start date of logical year for that track
ccyy-mm-dd - end date of logical year for that track
.DB.txt - data base identifier and file type

Example: AQU_2015-11-04_2016-04-16.DB.txt

Handiman
04-09-2016, 01:24 PM
So the csv files are located in a folder on your C drive where they are accessed by your own program. After handicapping with the csv files for the day, then do you clear them out and replace them the next day with new csv files?

What I'm trying to get at is do you have a folder on your C Drive that you use to locate your csv files, that you clean out every day with the next days csv files?

Thanks,
Handi:)

Augenj
04-09-2016, 01:36 PM
So the csv files are located in a folder on your C drive where they are accessed by your own program. After handicapping with the csv files for the day, then do you clear them out and replace them the next day with new csv files?

What I'm trying to get at is do you have a folder on your C Drive that you use to locate your csv files, that you clean out every day with the next days csv files?

Thanks,
Handi:)
The CSV daily files have unique date names and are deleted at the end of the week during the append to the history files. The daily CSV files remain in the same folder until then.

headhawg
04-09-2016, 02:36 PM
Handi,

Have a configuration button or menu option, part of which is the ability to save folder paths. Just create a config file or an .ini file that will let the user save the folder path for data files and/or batch processing. (Could be different paths.) Load the .ini file when Handifast starts, and give the user an file dialog option if they want to change the path on the fly.

If you really want to be slick then you can also have an automatic archive option. EquiSim was really good at that. Wish Nathan would still support that program.

HH

Red Knave
04-10-2016, 10:00 AM
Handi

headhawg has it right but I wonder if you are asking something else?
Are you worried about filling up the directory and/or having to select only the files for a certain day?
Some software I have used has a 'download' directory and then creates a 'work' directory for intermediate short term usage files and clears that every time the date/track/race changes. The software moves the data from the download directory to the work directory as needed.
Other software I have seen does the download and then automatically adds that data to a database of PPs that is read from to get data for whatever track/date/race is required.
I think if you pay to download data you should keep it somehow.

Handiman
04-10-2016, 03:59 PM
The task is to have one program access data files located on different user's computers and make the dir the default directory for that program on that computer.

Handi:)

headhawg
04-10-2016, 04:30 PM
I still don't quite understand. Why would data files be located on different computers? Are you talking about networked computers? If you want to have the same default directory then just force the install to a static file structure like C:\Handifast\ and have a subfolder called datafiles or whatever. Personally, I really dislike programs that aren't flexible enough to let the user install programs and store files where they want but perhaps I am still misunderstanding the goal here.

Red Knave
04-10-2016, 04:48 PM
So your program on a computer that you control, will access my computer remotely and manipulate data in my specified directory?
If I have it right, that's interesting but there should be better ways to do that.

Handiman
04-11-2016, 12:46 AM
NO. Everybody downloads race files from a vendor and they place the data files on their C:/ drive. But not everybody puts their files in the same folders. Everybody who gets Handifast and puts it on their computer then when you run it it has to find those datafiles. I was looking for a clean way to do that. Then I figured out what I needed to do along with confirmation from HeadHawg.

So I'm squared away as I answered my own question with HH help. There is no remote controlling anything. Everything is as before, except for a couple of added benefits I believe, or at least hope people will like.

Handi:)

Red Knave
04-11-2016, 01:09 PM
Thanks Handi. That, of course, makes a lot more sense.