I recently had very kind assistance on how to make the below code copy the most recent file from a file on my C:\ called 'C:! BATCH'
It's transpired that I now need to have the batch file only look for .bak files in this dorectory, and while I'm positive this is a relatively simple tweak, I've so far had no luck on finding how this is done.
Any advice on this would be very much appreciated, many thanks!
@echo off
pushd C:\! BATCH
setLocal EnableDelayedExpansion
for /f "tokens=* delims= " %%G in ('dir/b/od') do (set newest=%%G)
copy "!newest!" C:\DROP\
PAUSE