I have a bunch of Excel Workbooks that update periodically. I want to copy these files every Sunday to the folder created with current date in the name (e.g. Workbooks-28.06.2017). I have written a batch script but it is not working.
What am I doing wrong?
Code:
@echo OFF
xcopy /s C:\Users\rerraboina\Desktop\tracker automation\Consolidation\test dynamic
for /f "skip=1" %%d in ('wmic os get localdatetime') do if not defined mydate set mydate=%%d
md %mydate:~0,8%
xcopying before creating the folder and the second parameterdestinationis missing e.g.xcopy source destination. I've posted my answer. You can go through it and then compare it with yours to understand what is happening here.