I have simple batch file that copy files from one location to another. Yesterday afternoon it worked, this morning it does'nt, gives the "Invalid number of parameters" error message.
I'm pretty confident the error lies within this line of code:
As if I remove it the code works. Could it be that yesterday the time was afternoon so it displayed 15:42, but this morning there is a space as it's 8:40 ?
Any suggestions appreciated
Here is all the code
set backupcmd=xcopy /s /c /d /e /h /i /r /k /y
echo ### Backing up the directory...
%backupcmd% "\\network1\folder1\*.*" "%drive%\%dateNtime%"
echo Backup Complete - Your Backup is located at %drive%