Subj : Re: .bats To : Spiro Dotgeek From : Paul Hayton Date : Sat Oct 18 2014 20:36:58 On 10/18/14, Spiro Dotgeek pondered and said... SD> I don't actually know anything about batch scripting on windows. I'm a SD> unix guy through and through, and that whole script could be replaced SD> with a one-liner in linux: Success it's %date:~-4,4%-%date:~-7,2%-%date:~-10,2%-filename.txt From the web The :~ substring command works like this: :~[START POS],[LENGTH] If [START_POS] is positive or zero the substring will start from the left. If the number [START_POS] is negative it will start from the right. And [LENGTH] is the number of characters in the opposite direction of the starting point. `I'm not expendable, I'm not stupid, and I'm not going' - Kerr Avon, Blake's 7 --- Mystic BBS v1.10 A52 (Windows) * Origin: Agency BBS | telnet://agency.bbs.geek.nz (3:770/100) .