I tried this code to move the "newest" file in a network folder.
set sourcedir=c:\backups
set destdir=D:\archive
for /f "tokens=*" %%a in ('dir /b /a-d /o-d "%sourcedir%\*.*"') do set filename=%%a & goto :next
:next
move "%filename%" "%destdir%"
Problem is, it just copies ALL files in the folder. Evidently this method does not work across a network. Any other methods that may work. Any option that will process on Windows 2003 Server is conciderable.
Start Free Trial