This part of script is not setting value for variable creationYear
.
set creationYear=dir/T:C %%i | cut -c 7-10
echo %creationYear%
Showing ECHO is off, there is @ECHO OFF
at start.
This part of script is not setting value for variable creationYear
.
set creationYear=dir/T:C %%i | cut -c 7-10
echo %creationYear%
Showing ECHO is off, there is @ECHO OFF
at start.
for /f "tokens=* delims=" %%# in ('dir/T:C %%i ^| cut -c 7-10') do (
set "creationYear=%%#"
)
echo %creationYear%
despite you can get the creation date without external tools like cut