JCapper Message Board
Hit the ground running - Get .JCP Data Files and rename to .DRF
|| Hit the ground running - Get .JCP Data Files and rename to .DRF
|From the email inbox:|
"Jeff, --end quote
If all I want to do is get .JCP files -- and rename the the file extension from .JCP to .DRF so that I can use them in an app other than JCapper:
What's the best way to hit the ground running?
Thanks in advance,
If I weren't going to use JCapper at all - and simply wanted to get .JCP files, and rename them by changing the file extension from .JCP to .DRF so that I could use them in a third party app...
Each Day I would do the following:
- Download HDW data files for today's race cards onto a target folder on my hard drive.
Note that this step includes running .JCP File Build Routines on the downloaded HDW files. This creates comma delimited text .JCP files on the current active data folder of the hard drive.
Note that the entire file download process can be automated. But recommend you get the hang of running the HDW File Download Tool manually first. (And then automate once you have a clear understanding of the manual process.)
- Rename all .JCP files on my target folder by changing the file extension for .JCP files from .JCP to .DRF
- Load the (now renamed as) .DRF files (formerly .JCP files) into my third party app.
Ok. That's the daily strategy (from a high level.)
Now, let's give each of those areas a closer (ground level) look:
Downloading HDW data files
Start by going to the JCapper 101 Audio Video Page at the following link:
Watch the The DFM (Data Folder Manager) - Basic Operating Instructions video in the JCapper BASIC section:
You need to know how to use the DFM to control the current active data folder. That's where files downloaded from the HDW site end up. (And it's covered in the video.)
Watch the Monthly Downloaders: Downloading Files from the HDW Site (and building comma delimited text .JCP Files) video in the Working with HDW Data section:
You need to know how to use the HDW File Download Tool to queue up data files and download them to your current active data folder. (Covered in the video.)
You need to know how to use the File Build Filter Tool to run JCP File Build Routines on HDW binary race files downloaded to your current active data folder. (Also covered in the video.)
Once you are confident you can do the above without referring back to the videos...
Let's Automate the File Download Process a bit:
- On the Main Module click System Settings.
- On the System Settings Interface click Enhanced Settings.
- In the Enhanced Settings Module - change four of your settings so that they match the four highlighted settings shown in this screenshot:
- Click the SAVE button after you make the four settings changes and x-out of the Enhanced Settings Module.
Now, with the correct settings persisted - and you shouldn't ever have to touch those settings again...
From this point forward - each day when it's time to download data files...
DOWNLOAD YOUR DATA FILES Using THESE STEPS:
- Launch the HDW File Mgr.
- Click MENU - select SWITCHES - then select GETDATAFILES TODAY AUTOBUILD NOEXIT - and answer YES at the prompt to run the switch.
Here's a screenshot of what the Switches Menu looks like in the HDW File Mgr:
Each time you run the GETDATAFILES TODAY AUTOBUILD NOEXIT switch...
The HDW File Manager will perform the following tasks automatically:
- Navigate the HDW site and queue up today's data files.
- Download today's data files to the current active data folder persisted in the DFM.
- Run a .JCP File Build Routine on files downloaded in the previous step and create .JCP files on the current active data folder.
--The best part is that ALL of this runs automatically without you having to click anything else.
If you've followed the above steps - at this point you have comma delimited text .JCP data files sitting on the folder that you have checked as the Current Active Data Folder in the DFM.
If you don't know what that means - you need to stop here - scroll up - and watch the The DFM (Data Folder Manager) - Basic Operating Instructions video (above.)
Once you know what that means - it also means now you know how to change the setting that controls the folder where your downloaded files end up.
Now that you have you have comma delimited text .JCP data files sitting on the folder where you want them:
The next step is to rename them by changing the file extension from .JCP to .DRF.
There are many ways to get this done.
One of the easiest ways is to execute the rename command from a DOS command prompt.
More to come...
~Edited by: jeff on: 6/13/2017 at: 3:37:34 PM~
|From a high level, the strategy I am going to present below involves:|
- Creating an executable .BAT File that contains the DOS commands that will perform the file rename.
- Creating a Desktop Shortcut to run the executable .BAT File created in the previous step.
- Running the Desktop Shortcut on a regular basis to rename new .JCP files to .DRF
Now, let's give each of those areas a closer (ground level) look.
1. Creating an executable .BAT File that contains the DOS commands that will perform the file rename:
FYI, .BAT files are simply text files that contain DOS commands. When you double click a .BAT file: Windows recognizes the .BAT file extension and executes the file one line at a time. If the .BAT file contains valid DOS commands, the end result will be execution of the DOS commands in the file - in the order that they appear in the file.
The needed DOS commands are:
- a CD or Change Directory command that causes Windows to navigate to the folder where you are storing the .JCP files that you want renamed to .DRF
- a REN or Rename command that causes Windows to perform the actual file Rename: (In this case .JCP to .DRF)
- an Exit command to close the Command Prompt window after the Rename has been performed
To that end, here is a link to a text file I created that contains the needed DOS commands: http://www.JCapper.com/MessageBoard/Reports/RenJcpToDrf.txt To create an executable .BAT File that contains the DOS commands that will perform the file rename:
- Open an instance of Notepad in a new program window.
- Copy and paste the DOS commands from the above linked to text file into Notepad.
--The above screenshot shows an open instance of Notepad with the following DOS commands pasted in:
- CD C:\_Folder1
- REN *.JCP *.DRF
Then, from inside of Notepad:
- Click MENU, select SAVE AS, and in the resulting dialog box: Change the File Type from .txt to All Files (*.*), key in the file name (complete with file extension) that you want for your .bat file, navigate to the folder where you are keeping .JCP files that you want renamed to .DRF, and hit the SAVE button.
--Screenshot, creating the .BAT file in Notepad just before clicking the SAVE button:
--Notes about the above screenshot:
- I am about to save the .BAT file to a folder named "c:\_Folder1" (without the quotes.) This is the folder I am using for .JCP files that I want renamed to .DRF and it is important to note that I am saving the .BAT file to this same folder.
- I have changed the file type from *.txt to ALL Files (*.*)
- I am using "RenJcpToDrf.bat" (without the quotes) as the filename for my .BAT file - although any filename would work provided the file contains valid DOS commands and has a .BAT file extension.
2. Creating a Desktop Shortcut to run the executable .BAT File created in the previous step:
- Right click anywhere on your Windows Desktop, select NEW, and select Shortcut.
- Click the Browse button, navigate to the folder you are using for .JCP files that you want renamed to .DRF, single click the .BAT file created in the above step, and click OK.
--Screenshot, naming the .BAT file as the target of the shortcut:
- Click NEXT
- Give your Shortcut a Name and click FINISH
At this point you've created a new Shortcut, that when clicked, will execute the .BAT file -- which when run -- will rename all .JCP files in "c:\_Folder1" (without the quotes) from .JCP to .DRF.
3. Running the Desktop Shortcut on a regular basis to rename new .JCP files to .DRF
The email that I quoted at the very top of this thread was sent to me by a player whose primary interest was in using the HDW File Mgr under the JCapper Silver Data Plan to get comma delimited text .JCP and .XRD result files (both populated with HDW data) onto a folder on his hard drive so that he could use those files in Equisim.
The above instructions were written with an eye towards making that happen.
That said, below are some additional thoughts and comments I wanted to post.
Some of you are using the data in multiple programs:
If this describes you - and if you decide to adopt a file rename strategy like the one outlined above in order to use the files in another program - and if you are also using the data in JCapper:
It would be a VERY good idea for you to use the same quarterly folder structure that I recommended here
for purposes of using the files in JCapper...
And from there copy new .JCP files that are created each day to a completely separate (yearly) folder where you will rename them from .JCP to .DRF.
1. You still have .JCP files on your regular JCapper data folders -- which enables you to load them into JCapper for Calc Races on race day -- as well as being able to use them to build JCapper databases. (But a .JCP file renamed to .DRF can't be used for a Calc Races or a Build Database in JCapper.)
2. You also have a set of renamed .JCP files in a separate folder -- which enables you to load them into an outside of JCapper app. (But a .JCP file that hasn't been renamed to .DRF can't be loaded into Equisim.)
I also need to mention folder structure:
The names of the .JCP files themselves have the following components...
Track code - 1st 3 characters...
Month - next 2 characters...
Day of Month - next 2 characters...
File extension - last 4 characters...
Note that .JCP file names lack a year component.
This means that you need to change the pointed to folder in the DFM at least once a year to avoid overwriting older files that you've previously downloaded.
To that end -- here's a link to a thread on the JCapper Msg Board where I posted recommended folder structure for managing downloaded files in JCapper: http://www.jcapper.com/MessageBoard/TopicReader.asp?topic=2040&forum=General
|Hi Jeff what steps would be needed to use the files in jcapper and in third party software.|
Maybe I'm not understanding what you're asking --
But loading .JCP files into JCapper is pretty simple.
Just use the DFM Card Loader.
Loading .JCP files into a third party app like Equisim, Pace Apprasier, or an Excel spreadsheet?
Use whatever file loading interface is provided by the third party app or spreadsheet.