1.

Solve : For /F Getting File extention?

Answer»

I wanted to use a for LOOP to loop THROUGHT certain files, and i need the file type of the current file


for /f "tokens=1*" %%a in ('dir /a ..\folder') do (
if "%%a%%b"=="FILETYPE" (CLS) ELSE GOTO QUIT
)


something similar to the abovefor /f "delims==" %%A in ('dir /b') do (
if "%~xA"==".JPG" echo It is a jpeg
)


thanks dias that does the trick



Discussion

No Comment Found