windows的命令行下批量转换图片 回首页

FOR /F "delims=." %%d IN ('dir /ad /b .\*.*') DO (
    if not exist .\a1\%%d\. mkdir ..\a1\%%d
    FOR /F "delims=%%d\" %%k IN ('dir /N /b %%d\*.*') DO (
        C:\APP\ImageMagick-6.4.1-Q16\convert %%d\%%k ..\a1\%%d\%%k
        del %%d\%%k
    )
    rmdir %%d
)