This project is read-only.

38209 FoxBin2Prg (Ver ayuda en Español)

Note: this project has moved to GitHub:

vfpxreleasesmall.png Latest Release of FoxBin2prg (Download/Descarga)

Creator and Project Manager: Fernando D. Bozzo


Thank you for your support!

Demo video:

See YouTube demo video of FoxBin2Prg used with PlasticSCM

What is FoxBin2Prg?

It is a program intended to be used with SCM tools (Source Code Managers, like VSS, CVS, SVN) and DVCS tools (like Git, Mercurial, Plastic, and others), or as standalone program for Diff (viewing differences) and Merge operations, that pretends to substitute SccText/X and TwoFox and enhance their functionality, generating bidirectional PRG-Style versions that allow recreating the original binary file.


  • It generates "PRG" style programs (not compilable), for visual comparison
  • It enables the change of the Text version as easy as modifying a PRG
  • All the program code is in just one PRG, to simplify its maintainability
  • With Text versions you can regenerate the original binaries, so it is useful as backup
  • The extensions are configurable if you create the FOXBIN2PRG.CFG file
  • Inheritance of CFG configuration files between directories
  • Methods and properties of Text version are alphabetically sorted for easy comparison
  • Can set "UseClassPerFile" setting to create individual files by class or DBC member
  • Takes advantage of the API using foxbin2prg as an object
  • It has compatibility with SccText/X at parameter level so can be used as substitute with SourceSafe
  • Productivity: You can create a shortcut in the "SendTo" folder on your user Windows Profile, so you can "send" the selected file (pjx,pj2,etc) to Foxbin2prg.exe and make on-the-fly conversions
  • Modify TX2 Prg-Style versions with MODIFY COMMAND (without compile) to see colored syntax, or even use the Document View to navigate the procedures
  • Get back your SourceSafe projects (.pjx) from their .pjm files

Currently supports the conversion between PJX,SCX,VCX,FRX,LBX,DBC,DBF and MNX files, for which a TEXT version is generated with PJ2,SC2,VC2,FR2,LB2,DC2,DB2 and MN2 extensions, and can be reconfigured to be compatible with SCCAPI (just tested with SourceSafe).




FoxBin2Prg can be used in two ways:

EXE version: (Recommended and fastest)
All-inclusive, you just need foxbin2prg.exe and filename_caps.exe/cfg.

PRG version:
You need various files: foxbin2prg.prg, all the props*.txt files and filename_caps.exe/cfg.

Note: All mentioned files need to be in the same folder. You can't use just the PRG without the rest of the mentioned files.

To use FoxBin2Prg from the File Explorer, you can create 3 shortcuts of FoxBin2Prg.exe and move them to "SendTo" folder on your Windows profile hint: type *shell:sendto* in File Explorer's address bar and it will open send to folder, so you can "send" the selected file (pjx,pj2,etc) to the selected option, and make on-the-fly conversions, then rename and edit those shortcuts as this (make sure you can see system file extensions):

Name------------------------  Right-click/Properties/destination-----------
FoxBin2Prg - Binary2Text.lnk  <path>\foxbin2prg.exe "BIN2PRG-SHOWMSG"
FoxBin2Prg - Text2Binary.lnk  <path>\foxbin2prg.exe "PRG2BIN-SHOWMSG"
FoxBin2Prg.lnk                <path>\foxbin2prg.exe "INTERACTIVE-SHOWMSG"

(Actually with the 3rd option you can substitute the other two, using only one option)

  • With "BIN2PRG" or "PRG2BIN" options, you can process directories or individual files, but for the corresponding type of conversion
  • With just FoxBin2Prg.exe you can process directories or individual files for any type of conversion
  • With the "INTERACTIVE" option, a confirmation dialog will be shown when processing a directory with just FoxBin2Prg without BIN2PRG or PRG2BIN options, asking what to convert. This option overrides the BIN2PRG and PRG2BIN parameters
  • With the "SHOWMSG" option a status message will be shown on termination

Important note: When you process a directory, it is used as the base for the compilation of binaries, and because of this, never process more than one directory in the same process, because the compilation may not be ok. To process more than one directory (or project), just select and process each one independently, in parallel if you like, but in different processes

Example of FOXBIN2PRG.CFG configuration file if need to change extensions for using with VSS (SourceSafe)

extension: SC2=SCA
extension: VC2=VCA
extension: PJ2=PJA
extension: MN2=MNA
extension: FR2=FRA
extension: LB2=LBA
extension: DB2=DBA
extension: DC2=DCA

Using the "EXE" version: (useful for calling from programs)

FOXBIN2PRG.EXE "<path>\file.scx" Generates the Text version
FOXBIN2PRG.EXE "<path>\file.sc2" Regenerates the Binary version
FOXBIN2PRG.EXE "<path>\proj.pjx" "*" Generates the Text files for all the files in the PJX, including the PJX
FOXBIN2PRG.EXE "<path>\proj.pj2" "*" Regenerates the Binary files for all the files in the PJ2
FOXBIN2PRG.EXE "<path>\proj.pjx" "*-" Generates the Text files for all the files in the PJX, excluding the PJX
FOXBIN2PRG.EXE "<path>\file.vcx::cus_client" Regenerates only the Text version of the individual class cus_client of file.vcx (with UseClassPerFile:1 or 2)
FOXBIN2PRG.EXE "<path>\proj.pj2" "*" | find /V "" Regenerates the Binary files for all the files in the PJ2 and outputs to stdOut

Using the "PRG" version:

DO FOXBIN2PRG.PRG WITH "<path>\file.scx" Generates the Text version
DO FOXBIN2PRG.PRG WITH "<path>\file.sc2" Regenerates the Binary version
DO FOXBIN2PRG.PRG WITH "<path>\proj.pjx", "*" Generates the Text files for all the files in the PJX, including the PJX
DO FOXBIN2PRG.PRG WITH "<path>\proj.pj2", "*" Regenerates the Binary files for all the files in the PJ2
DO FOXBIN2PRG.PRG WITH "<path>\proj.pjx", "*-" Generates the Text files for all the files in the PJX, excluding the PJX
DO FOXBIN2PRG.PRG WITH "<path>\file.vcx::cus_client" Regenerates only the Text version of the individual class cus_client of file.vcx (with UseClassPerFile:1 or 2)

Using the "Object" version:

*-- Instancing directly from the EXE (fastest way, only EXE needed)
LOCAL loCnv AS c_foxbin2prg OF "FOXBIN2PRG.PRG"
loCnv = CREATEOBJECT("c_foxbin2prg")
loCnv.execute( <params> )

-or this way also-

*-- Instancing from the PRG (you also need various files, like the 27 props*.txt)
LOCAL loCnv AS c_foxbin2prg OF "FOXBIN2PRG.PRG"
loCnv = NEWOBJECT("c_foxbin2prg", "<Path>\FOXBIN2PRG.PRG")
loCnv.execute( <params> )

There are some differences in the parameters when you call foxBin2prg.exe from the outside (with RUN or from another EXE), or when using it as an object and work directly with the "execute" method, which is more flexible and has more options:

EXE/object Parameters Return value
FoxBin2Prg.EXE cInputFile [,cType [,cTextName [,lGenText [,cDontShowErrors [,cDebug [,cDontShowProgress [,cOriginalFileName [,cRecompile [,cNoTimestamps [,cCFG_File] ] ] ] ] ] ] ] ] ] ErrorLevel 0=OK, 1=ERR
obj.execute() cInputFile [,cType [,cTextName [,lGenText [,cDontShowErrors [,cDebug [,cDontShowProgress [,oModule [,oEx [,lRelanzarError [,cOriginalFileName [,cRecompile [,cNoTimestamps [,cBackupLevels [,cClearUniqueID [,cOptimizeByFilestamp [,cCFG_File] ] ] ] ] ] ] ] ] ] ] ] ] ] ] 0=OK, num=VFP Error code

Note: When using the EXE, if using any combination of ("BIN2PRG", "PRG2BIN", "INTERACTIVE", "SHOWMSG") separated by a "-", cType and cInputFile parameters can be swapped. This is useful when dealing with Windows shortcuts, on which fixed parameters must be in the shortcut and the filename is an external variable parameter received when SendingTo FoxBin2Prg with right-click on File Manager.

<params> are: Param.Type and Description (!=Required | ?=Optional) (@=by reference | v=by value), (IN/OUT)
cInputFile (v! IN ) Path+Filename of the file to convert, or Path+Filename::classname for generating individual class with UseClassPerFile:1 or 2. For VSS compatibility, can have a cType letter to query the support type.
cType (v? IN ) For VSS compatibility, indicates the file type (d=DBC, D=DBF, K=Form, B=Label, M=Menu, R=Report, V=Class), -or- indicates some extra combinable options separated by "-" => "BIN2PRG-PRG2BIN-INTERACTIVE-SHOWMSG" -or- can be a "*" (only when cInputFile is a PJX/PJ2) which indicates that all project files must be processed
cTextName (v? IN ) For VSS compatibility, name of the Text version of the file
lGenText (v? IN ) For VSS compatibility, .T.=Generate Text, .F.=Generate Binary. Note: cType have predominance over lGenText
cDontShowErrors (v? IN ) '1' for NOT showing errors with MESSAGEBOX
cDebug (v? IN ) '1' for debugging on the error point (just development mode)
cDontShowProgress (v? IN ) '1' for NOT showing the progress bar
cOriginalFileName (v? IN ) For cases when inputFile is a temp name and you want the correct original name (for example: inside PJ2 files and headers)
cRecompile (v? IN ) If a Path is provided, the binary is recompiled from it. If called from SCCAPI, it's True, else it's False
oModulo (@? OUT) Internal use for Unit Testing
oEx (@? OUT) Exception object
cNoTimestamps (v? IN ) '1' or empty for clearing timestamp, '0' for not clearing it
cBackupLevels (v? IN ) Number of backup levels for converted files. '0'=No backups, default is '1' .bak
cClearUniqueID (v? IN ) '1' or empty for clearing UIDs inside tx2, '0' for not clearing it. Default is '1'
cOptimizeByFilestamp (v? IN ) '1' for not regenerating target file when its timestamp is greater than source file. Default is '0' (disabled)
cCFG_File (v? IN ) Allow specifying a CFG in a special directory

Note: Please read the README.txt and FoxBin2Prg.cfg.txt files for more technical info.

Keep reading:

> FoxBin2Prg Internals and Configuration
> FoxBin2Prg and use with SCM tools
> FoxBin2Prg Full Change History

vfpxreleasesmall.png Latest Release of FoxBin2prg


Last edited Aug 22, 2017 at 2:48 PM by DougHennig, version 97


fdbozzo Jul 17, 2016 at 3:00 PM 
Ok, just added a Donate button, just in case someone want to use it :)

JodyLMeyer Nov 18, 2015 at 4:42 PM 
Good Day!

I am using this wonderful tool inside of SourceTree to convert my binaries to text. It would be really nice that if I select the .SCT instead of the .SCX... that FoxBin2Prg would just work and assume I meant to pass in the .SCX. Does that make sense?


gomes_metha Sep 25, 2014 at 3:13 PM 
I started to use this month, combined with TortoiseGit, and I'm liking. Thank you!

fdbozzo Aug 28, 2014 at 1:05 AM 
One more thing: FoxBin2Prg takes care of the file capitalization, so binaries and text files are converted to lowercase extensions. This behaviour is configurable.

For more questions, you better use the "Discussions" tab on VFPx, or the Google's Thor Group, in this link:!forum/foxprothor

fdbozzo Aug 28, 2014 at 12:59 AM 
Hi LuciferSam:

Yes, you can, but using the included scripts.

The deal is you use the included scripts from File Explorer to do mass convertions for a directory, selecting the type of convertion, Prg2Bin or Bin2Prg. You can even select a group of files.
Those scripts internally call FoxBin2Prg, but adding the support of directory processing.

Finally, once you get your converted files, you checkin the binaries and the tx2 text files, being careful of not forgetting any file.

You just want to make text versions for changed files, but if you don't remember which files have changed, then process all and FoxBin2Prg just regenerates the changed ones, leaving the rest untouched.

LuciferSam Aug 27, 2014 at 8:22 AM 
is it possible to use this program with TortoiseSVN? Can I find an example? Thanks.

fdbozzo Aug 24, 2014 at 12:49 AM 
You welcome :)

mmarius28 Aug 22, 2014 at 1:20 PM 
Thank you :)

mmarius28 Aug 22, 2014 at 1:19 PM 
It is very useful. I just started a merge between two branches of the same project which diverged for one year.

I made a list with all the modified files from SVN log. Then I used FoxBin2Prg to generate the text version in both projects for all modified files.

I use WinMerge to compare the directories of the two projects only for the text versions of the binary files and programs.

I have just merged the bigest vcx library in the project and converted it back to binary vcx. It worked great!!!