Sorry, I have now more information.
This code is part of a batch which classifies different kind of archives, like PSD, DNG, MOV, etc.
If I isolate this code in a single BATCh everything works. The trouble appears when it is in the full BATCH I copy now its code:
Code: Select all
REM JPG CLASIFICA Y COMPRIME A 90
for %%F in (*.JPG) do (
for /f "tokens=1-3 delims=/ " %%A in ("%%~tF") do (
md "%%C-%%B-%%A"
md "%%C-%%B-%%A/JPG ORIGINAL"
convert "%%F" -resize 1500x1000 -quality 90 -interlace plane "%%C-%%B-%%A/%%F"
move "%%F" "%%C-%%B-%%A/JPG ORIGINAL"
)
)
REM PSD
for %%F in (*.PSD) do (
for /f "tokens=1-3 delims=/ " %%A in ("%%~tF") do (
md "%%C-%%B-%%A"
md "%%C-%%B-%%A/PSD"
move "%%F" "%%C-%%B-%%A/PSD"
)
)
REM RAW
for %%F in (*.NEF) do (
for /f "tokens=1-3 delims=/ " %%A in ("%%~tF") do (
md "%%C-%%B-%%A"
md "%%C-%%B-%%A/DNG"
move "%%F" "%%C-%%B-%%A/DNG"
)
)
for %%F in (*.CR2) do (
for /f "tokens=1-3 delims=/ " %%A in ("%%~tF") do (
md "%%C-%%B-%%A"
md "%%C-%%B-%%A/DNG"
move "%%F" "%%C-%%B-%%A/DNG"
)
)
for %%F in (*.DNG) do (
for /f "tokens=1-3 delims=/ " %%A in ("%%~tF") do (
md "%%C-%%B-%%A"
md "%%C-%%B-%%A/DNG"
move "%%F" "%%C-%%B-%%A/DNG"
)
)
REM VÍDEOS
for %%F in (*.MOV) do (
for /f "tokens=1-3 delims=/ " %%A in ("%%~tF") do (
md "%%C-%%B-%%A"
md "%%C-%%B-%%A/MOV"
move "%%F" "%%C-%%B-%%A/MOV"
)
)
for %%F in (*.3GP) do (
for /f "tokens=1-3 delims=/ " %%A in ("%%~tF") do (
md "%%C-%%B-%%A"
md "%%C-%%B-%%A/3GP"
move "%%F" "%%C-%%B-%%A/3GP"
)
)
for %%F in (*.MP4) do (
for /f "tokens=1-3 delims=/ " %%A in ("%%~tF") do (
md "%%C-%%B-%%A"
md "%%C-%%B-%%A/MP4"
move "%%F" "%%C-%%B-%%A/MP4"
)
)
for %%F in (*.MTS) do (
for /f "tokens=1-3 delims=/ " %%A in ("%%~tF") do (
md "%%C-%%B-%%A"
md "%%C-%%B-%%A/MTS"
move "%%F" "%%C-%%B-%%A/MTS"
)
)
for %%F in (*.AVI) do (
for /f "tokens=1-3 delims=/ " %%A in ("%%~tF") do (
md "%%C-%%B-%%A"
md "%%C-%%B-%%A/AVI"
move "%%F" "%%C-%%B-%%A/AVI"
)
)
del Convert.bat
The error is (in spanish):
Procesador de comandos de Windows
Procesador de comandos de Windows dejó de funcionar
El programa dejó de funcionar correctamente por un problema. Windows cerrará el programa y le notificará si existe una solución.
Cerrar programa
The last is a button. When I press it directly closes the DOS Window.