hi guys
I am out onsite in china and I have written my first batch file using the internet and making it work the code below works well it moves files that are created over the day to a folder and then renames the folder with unique day. this works perfectly well when I run it by clicking on it I then used task scheduler to run it daily at the same time only half works it creates the folder and moves the files to the folder but does not rename it with the date this is a problem because when it runs the next time it overwrites the folder.
if you have any ideas it would be much appreciated.
@echo off
mkdir "c:\data_log_files\Stored_Data"
move /y "C:\data_log_files\*Data_Logs*.XLS" "C:\data_log_files\Stored_Data"
for /f "tokens=1-5 delims=/ " %%d in ("%date%") do rename c:data_log_files\Stored_Data Stored_Data(%%d-%%e-%%f)