I have a batch file to retrieve files from an FTP site and download to my local directory each day. I need to write something to delete any files in my local directory that are not the latest file.
The file names are sequential, but are not date related.
i.g. file123, file124, file125, ...
I want to delete file123, file124.
Anyone have any ideas? In QS or batch.