windows - Remove file ext from batch -
hay have search around here alot , try whole day remove file ext path name
i try after b variable set, won´t work, when im asking somewhere can tell in foreach folders can loop in?
now loop in in folder want loop in folder a-z , no files in working directory
/mvh lukasz
@echo off & setlocal enabledelayedexpansion :: foreach files in folder /r . %%f in (*) ( :: file extension set a=%%~xf echo !a! :: set path set b=%%f :: remove file ext set d=!b:!a=% echo !d! :: show result ::echo !d:%cd%\=! mkdir "%cd%\root\!b:%cd%\=!" ) pause
@echo off setlocal enableextensions disabledelayedexpansion /r "%cd%" %%a in (*) %%b in ("%%~dpa.") ( if not exist "%cd%\root\%%~nb\%%~na\" echo mkdir "%cd%\root\%%~nb\%%~na" )
if output console correct, remove echo
create folders
Comments
Post a Comment