Database Handicapping Software- JCapper

JCapper Message Board

          JCapper 101
                      -- Hit the ground running - Get .JCP Data Files and rename to .DRF

Home Register
Log In
By Hit the ground running - Get .JCP Data Files and rename to .DRF
jeff
6/13/2017
3:37:34 PM
From the email inbox:


--quote:
"Jeff,

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,

J.B."
--end quote




--my reply:

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:

  1. 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.)


  2. Rename all .JCP files on my target folder by changing the file extension for .JCP files from .JCP to .DRF


  3. 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:
http://www.jcapper.com/podcasts/podcasts.asp

Watch the The DFM (Data Folder Manager) - Basic Operating Instructions video in the JCapper BASIC section:
http://www.jcapper.com/podcasts/podcasts.asp#V00

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:
http://www.jcapper.com/podcasts/podcasts.asp#V08

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:

  1. On the Main Module click System Settings.


  2. On the System Settings Interface click Enhanced Settings.


  3. In the Enhanced Settings Module - change four of your settings so that they match the four highlighted settings shown in this screenshot:



  4. 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:

  1. Launch the HDW File Mgr.


  2. 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...










-jp

.

~Edited by: jeff  on:  6/13/2017  at:  3:37:34 PM~

Reply
jeff
6/16/2017
6:28:26 PM
From a high level, the strategy I am going to present below involves:
  1. Creating an executable .BAT File that contains the DOS commands that will perform the file rename.
  2. Creating a Desktop Shortcut to run the executable .BAT File created in the previous step.
  3. Running the Desktop Shortcut on a regular basis to rename new .JCP files to .DRF


  4. 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:

    1. Open an instance of Notepad in a new program window.


    2. Copy and paste the DOS commands from the above linked to text file into Notepad.

      --Screenshot:
      Notepad with DOS REN Command

      --The above screenshot shows an open instance of Notepad with the following DOS commands pasted in:
      • CD C:\_Folder1
      • REN *.JCP *.DRF
      • EXIT^Z


      Then, from inside of Notepad:

    3. 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:
      SAVE AS .BAT File

      --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:

    1. Right click anywhere on your Windows Desktop, select NEW, and select Shortcut.

    2. 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:
      Naming the .BAT file as the target of the shortcut

    3. Click NEXT

    4. Give your Shortcut a Name and click FINISH



    That's It!

    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.

    That way:

    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






    -jp

    .

    Reply
WayneN
9/22/2017
1:35:45 AM
Hi Jeff what steps would be needed to use the files in jcapper and in third party software.

Thanks

Wayne

Reply
jeff
9/25/2017
2:12:06 PM
.JCP files?

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.


-jp

.





Reply
Reply

Copyright 2008 JCapper Software              back to the JCapper Message Board              www.JCapper.com