@echo off setlocal enabledelayedexpansion for %%c in (*) do ( set str=File-%%c echo !str! ) echo. & pause