Re: possible to get just the last line of an ls?
See this example script for similar task.
Before posting, please read how to report bug or request support effectively.
Bug reports without an attached log file are usually useless.
call cp -p `ls /path/to/file/namewithdate*.TXT|tail -1` /other/path/ID_namewithdate.txt
get -preservetime /other/path/ID_namewithdate.txt c:\NewFilename.txt