I've pieced together this script to try and move a file from a folder to another, and add a date to the end of the file. It worked once, but hasn't worked since. This is my first script, and I was hoping an expert would take a look and advise if they see something wrong here. Any assistance would be greatly appreciated.
@echo off move "c:\ic\test source\*.*" "c:\test destination" for /f "delims=" %%a in ('wmic OS Get localdatetime ^| find "."') do set dt=%%a set YYYY=%dt:~0,4% set MM=%dt:~4,2% set DD=%dt:~6,2% set HH=%dt:~8,2% set Min=%dt:~10,2% set Sec=%dt:~12,2% set stamp=%YYYY%%MM%%DD%_%HH%%Min%%Sec% quit