There are some files with extension .out in a folder. They can be opened as text. The contents of some of these files start by the character 0. I want to move them to a dedicated folder (named zero) using a Windows batch command.
I tried the following:
@echo off
setlocal EnableDelayedExpansion
for %%x in (*.out) do (set /p y=< "%%x" & echo !y! & if !y:~0,1!==0 move "%%x" "zero")
but it does not work... How to do that?