I've written a script, but it has some limitations and the search algorythm is rather dumb. Here is the code:
CODE
@ECHO OFF
if "%~1"=="" (
echo Usage: Create a shortcut to this script and drop folders to it OR
echo Usage: use command line: embed-cues.cmd "Path to directory"
echo.
echo WARNING: it works recursively for all the subdirectories of the given path.
echo Note: Don't forget to download the TAG utility and edit the correspoding script line.
echo.
pause
goto :EOF
)
:: Written by djet [HQShare.net], 2005
SET version=0.99
:: Last Modification: 16.12.2005
TITLE=djet's little CUE&LOG embedder, Version %version%
:: This scripts uses a modded version of Case's TAG utility. Download it here:
:: http://www.synthetic-soul.co.uk/tag/
:: Don't forget to write the correct path below:
SET Tag="s:\Multimedia\Soundz Good\Tag\Tag.exe"
CLS
setlocal ENABLEDELAYEDEXPANSION
pushd %1
for /r %%C in (*.cue) do (
::some unfinished ideas..
FOR /F "usebackq TOKENS=*" %%f IN (`findstr /B "FILE " "%%C"`) DO SET cueline=%%f
::echo !cueline!
::set cuefile=!cueline:~6,-6!
::echo !cuefile!
::if exist "%%~dpC%cuefile%" echo "%%~dpC%cuefile%" exists.
:: embedding the CUE(s)
%Tag% -f "CUESHEET=%%C" "%%~dpnC*.*"
::embedding Log(s). not a good idea to search for ALL log files in folder.. don't have others though =/
for %%L in ("%%~pC*.log") do %Tag% -f "LOGFILE=%%~fL" "%%~dpnC*.*"
::Log with a matching filename has higher priority
%Tag% -f "LOGFILE=%%~nC.log" "%%~dpnC*.*"
::Rename the .CUE file to .CUESHEET to avoid duplicate entries in the fb2k database
ren "%%C" "%%~nC.cuesheet"
)
popd
endlocal
pause
if "%~1"=="" (
echo Usage: Create a shortcut to this script and drop folders to it OR
echo Usage: use command line: embed-cues.cmd "Path to directory"
echo.
echo WARNING: it works recursively for all the subdirectories of the given path.
echo Note: Don't forget to download the TAG utility and edit the correspoding script line.
echo.
pause
goto :EOF
)
:: Written by djet [HQShare.net], 2005
SET version=0.99
:: Last Modification: 16.12.2005
TITLE=djet's little CUE&LOG embedder, Version %version%
:: This scripts uses a modded version of Case's TAG utility. Download it here:
:: http://www.synthetic-soul.co.uk/tag/
:: Don't forget to write the correct path below:
SET Tag="s:\Multimedia\Soundz Good\Tag\Tag.exe"
CLS
setlocal ENABLEDELAYEDEXPANSION
pushd %1
for /r %%C in (*.cue) do (
::some unfinished ideas..
FOR /F "usebackq TOKENS=*" %%f IN (`findstr /B "FILE " "%%C"`) DO SET cueline=%%f
::echo !cueline!
::set cuefile=!cueline:~6,-6!
::echo !cuefile!
::if exist "%%~dpC%cuefile%" echo "%%~dpC%cuefile%" exists.
:: embedding the CUE(s)
%Tag% -f "CUESHEET=%%C" "%%~dpnC*.*"
::embedding Log(s). not a good idea to search for ALL log files in folder.. don't have others though =/
for %%L in ("%%~pC*.log") do %Tag% -f "LOGFILE=%%~fL" "%%~dpnC*.*"
::Log with a matching filename has higher priority
%Tag% -f "LOGFILE=%%~nC.log" "%%~dpnC*.*"
::Rename the .CUE file to .CUESHEET to avoid duplicate entries in the fb2k database
ren "%%C" "%%~nC.cuesheet"
)
popd
endlocal
pause
(hehe, the forum engine stripped all the tabs.. In the editor it looks better =)
Maybe there is a better solution?