by Brother Blonde » Sat Jul 21, 2007 11:30 pm
Steve,
here's the bat file info, as copied from notepad.
@echo off
REM Batch file for importing song files into Zionworx
REM To work properly it should be put in the directory
REM that normally contains the Zionworx.exe
REM file and is usually C:\Program Files\Zionworx
echo.
echo ##########################################################
echo ######## ########
echo ######## Zionworx Songfile Import Process ########
echo ######## ########
echo ##########################################################
echo.
echo Current directory is %CD%
echo.
REM Check for existence of Settings.ini
if not exist Settings.ini (
echo ERROR: Can't find Settings.ini.
echo Please check you have saved this file in the right place.
echo Import process abandoned.
echo.
pause
exit 1
)
REM Get path of database directory from Settings.ini file.
REM If it isn't defined there, use this default value.
set ddir=Data
REM First get line from ini file into temp file.
type "Settings.ini" | find "Database Path=" >xxx.txt
REM Read temp file, split at "=" and get second field into ddir variable.
for /f "usebackq tokens=1,2* delims==" %%i in (`type xxx.txt`) do set ddir=%%j
del xxx.txt
echo.
echo Data directory is %ddir%
echo.
REM Check for existence of ZionWorx.exe
if not exist ZionWorx.exe (
echo ERROR: Can't find ZionWorx.exe.
echo Please check you have saved this file in the right place.
echo Import process abandoned.
echo.
pause
exit 1
)
REM Check for existence of tdbDataX.exe
if not exist tdbDataX.exe (
echo ERROR: Can't find tdbDataX.exe. Import process abandoned.
echo.
pause
exit 1
)
REM Copy data directory and its subtree to Data.backup1.
REM If Data.backup1 exists, try Data.backup2, etc.
set origdir=%CD%
cd /D %ddir%
REM echo Current directory is now %CD%
set dircount=1
pause
:loop1
set backdir=..\Data.backup%dircount%
if exist %backdir% (
set /A dircount=%dircount% + 1
goto :loop1
)
echo Backing up data directory to %backdir%
echo.
xcopy "*.*" "%backdir%" /I /E /K /S /Q
if %ERRORLEVEL% NEQ 0 (
echo.
echo ERROR: Couldn't backup Data directory.
echo Import process abandoned.
echo.
pause
exit 1
)
echo Data backed up to %backdir%
echo.
cd /D %origdir%
echo About to import song files
echo.
for %%f in (*.sdf) do (
echo Importing %%f
tdbDataX %%f %ddir%\MainTable.dat -fsdf -s= -q#
REM Rename files after importing them so they aren't imported twice.
move %%f %%f.imported
)
echo ### Import process complete ###
pause
It all looks ok, I got all the files from your website, linked from the ZW forum. I keep having the same prob.
I'm sure we can fix it,
thanks for your help
Andrew.
Be blessed and be a blessing.