CODE: [Copy to clipboard]@echo off setlocal enabledelayedexpansion for %%a in (*.*) do ( set b=%%a echo !b:~-3! ) pause