javabatch-fileparadox

Borland Paradox converter to mysql


Trying to use this converter https://www.rebasedata.com/convert-paradox-to-mysql-online But the problem is that I have a Borland Paradox 5 database, which has 745 files and 176 DBS, and I exceed query length limits running this java applet.

I tried using a batch-file;

java -jar "%~dp0\client-0.0.5.jar" convert --output-format=mysql "%~dp0ABALANS.DB" "%~dp0ABALANS.PX" "%~dp0ABALANS.YG0" "%~dp0ABALANS.XG0" ... Output/

but all exceed query limits.

So my questions is:

  1. Are there ways to bypass query length limits using a batch-file?
  2. Are there ways to set a folder in this applet to automatically collect all files inside?
  3. Are there ways to change java code to set folder in this applet to automatically collect all files inside?

Solution

    1. Yes, but you'll need to call Win32 function CreateProcess from a homemade program in C/C++. You can then have 32768 chars for your command line, but nothing guarantee you that java.exe can accept it.
    2. Yes, use a for command within your batch.
    3. Don't know, I didn't look at the Java code.

    Normally, something like this should work: it would convert each file one at a time, but it will process all files automatically.

    @echo off
    setlocal EnableDelayedExpansion
    
    pushd %~dp0
    REM Parse all files in same folder as the batch.
    for %%I in (*.*) do (
        call :process_file "%%~dpnxI"
    )
    popd
    goto :eof
    
    REM Convert ONE database file.
    :process_file
    REM Add as many NON convertible extensions as needed.
    if /i %~x1==.bat goto :ignored
    if /i %~x1==.jar goto :ignored
    REM Effective conversion.
    echo Converting file: %~1
    java -jar "%~dp0client-0.0.5.jar" convert --output-format=mysql "%~dpnx1" Output/
    goto :eof
    :ignored
    echo Ignoring file: %~1
    goto :eof