I want to run a batch file that creates a folder that has as its name today's date and then to copy to that folder the contents of another directory.
I am apparently unable to retrieve the variable acquired from the command .GetLogDate.
My operating system is Windows 2003 Server SBS.
I have searched Experts-Exchange for an answer but the most help was in this thread:
* Experts Exchange
* Microsoft OS
* Windows OS
* Windows 2000
* Manipulating strings in a Windows 2000 batch file.
However, I had already visited the linked site and tried out what I found there, to no avail.
I am using this script:
robocopy D:\V E:\Backup\%#LogDate%\V /E /W:2 /R:2
When I run the script a new directory 'V' is made in E:\Backup. The '%#LogDate%' is ignored. After the new directory is made, the robocopy command works fine and, again ignoring the '%#LogDate%' in the path, files are copied from D:\V to E:\Backup\V.
How can I set this variable and use it to name a folder?