I have done a little experimenting with this task and I have the majority of it working. Basically the Task runs this command line
cmd.exe /c set y1=%date:~-4,4%&set m1=%date:~-10,2%&set d1=%date:~-7,2%&set nti=%time: =0%&set h1=%nti:~0,2%&set m2=%nti:~3,2%&move /Y %deployroot%\Captures\%RealComputerName% %deployroot%\Captures\Completed\%RealComputerName%_%y1%%m1%%d1%_%h1%%m2%
But when the command actually runs I get a moved folder with the name
MyComputerName_%y1%%m1%%d1%_%h1%%m2%
If I execute the command manually from the deployment server in a dos window everything works as it should and I get a moved folder with the name
MyComputerName_20130305_1029
What am I missing, why cant I get my task to run properly ?
I respect your one-liner, but it is difficult to parse. Is is possible that %DATE% is not available? The below code worked for me.