New Post here. I have a batch file im trying to get to work on Server 2008 R2.
What this does is it should Copy the Photos Folder and everything inside it and copys is to the same directory in D with attributes and a ending.Code::: --- BATCH SCRIPT START --- :: --- Batch File to Copy and create new folder for Photo Backup's --- :: --- Created By: Me --- @echo off setlocal enabledelayedexpansion for /F "tokens=2-4 delims=/- " %%A in ('date/T') do set target=D:\Photos\%%C-%%B-%%A-Photos Backup xcopy "D:\Photos\*" "%target%\" /E /-Y setlocal set source=D:\Photos pushd "%source%" FOR /F "skip=3 delims=" %%a IN ('DIR /B /AD 20?????? ^| SORT /R') DO RD /S /Q "%%a" popd endlocal :: --- BATCH SCRIPT END ---
After the 3rd Copy it deleted the first to make a new on...there should always be 3 copies that run daily.
Any help would be appreciated.
There are currently 1 users browsing this thread. (0 members and 1 guests)