1

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?
user692942
  • 16,398
  • 7
  • 76
  • 175
Dmitrij Holkin
  • 1,995
  • 3
  • 39
  • 86

1 Answers1

1
  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
Wisblade
  • 1,483
  • 4
  • 13
  • Since it would appear that all `java` needs to convert the files is the name of the `.db` file, and also that this appears to be a one-run-only requirement, I'd suggest `for %J in (*.db) do java -jar "%~dp0client-0.0.5.jar" convert --output-format=mysql "%~dpnxJ" Output/` (from the prompt) would suffice - or does `java` need to convert each index, etc. file individually as well? – Magoo Mar 24 '22 at 20:28
  • @Magoo Probably, I don't know this conversion tool at all. It can also "reject" the subfiles and process only the valid ones, I don't know either. The principle is there, we need more informations if it doesn't fulfill the initial need. – Wisblade Mar 25 '22 at 07:30