12.09.2009, 08:03
(This post was last modified: 12.09.2009, 08:03 by routeconverter.)
(11.09.2009, 17:42)routeconverter Wrote: In meinem nächsten Posting zeige ich dann, wie man das verwenden kann, um mehrere Dateien auf einmal zu konvertieren.
Das sieht dann zum Beispiel so aus:
Code:
@echo off
set sub=yes
set type=gpx
setlocal EnableDelayedExpansion
if /i %sub%==yes (set switch=/s) else (set switch=)
dir /b /a-d %switch% *.%type% > "%temp%\dir.txt"
findstr "%% ^ &" "%temp%\dir.txt" > nul && goto Error
for /F "delims=" %%a in ('type "%temp%\dir.txt"') do (
set Name1=%%a
set Name2=!Name1:gpx=crs!
java -jar RouteConverterCmdLine.jar "!Name1!" Crs1Format "!Name2!"
)
:Exit
echo.
echo Press Space to continue.
pause > nul
del "%temp%\dir.txt"
goto :eof
:Error
echo.
echo Warnung: The follow file names contain characters which this
echo batch program cannot process.
findstr "%% ^ &" "%temp%\dir.txt"
goto :Exit
Hilft Dir das weiter?
--
Christian
Christian