Friday, 23 November 2012

Daily Copy of Folder with suffix Date and Day

@echo off
E:
cd E:\oracle\Scripts
getday.vbs
for /f "tokens=*" %%p in (E:\day.txt) do (set day=%%p)
set day=%day: =%
echo %day%
for /F "tokens=1-4 delims=/ " %%i in ('date /t') do (set MEMORY=%%j%%i%%k)
set MEMORY=%MEMORY:,=%

xcopy e:\SOURCE \\DESTINATION\FOLDER%MEMORY%%day% /e /i

No comments:

Post a Comment