Getting file names in a batch script Remember: Replace double precentages with single precentage if you want to use it in CMD directly. When file names are printed out, they already include double quotes. @echo off