This is my first batch script. I want to convert a list of files and use a substring of the input filename (Day of year). However the substring part doesn't work:
SETLOCAL EnableDelayedExpansion
FOR %G IN (%dirInp%%station%???0.DAT) DO (
SET filInp="%G"
SET doy=!filInp:~-9,3! rem this doesn't work?
rem Convert Trimble GPS receiver observations to RINEX
%dirExe%teqc -tr d %G > %dirOut%%station%!doy!0.%yy%D
)
So, how should I do this?
%%Ginstead of%G.set filInp="%G"should beset "filInp=%%G"