Jump to content

jlamantia

Members
  • Posts

    1
  • Joined

  • Last visited

Reputation

0 Neutral

About jlamantia

  1. Hello all, New Post here. I have a batch file im trying to get to work on Server 2008 R2. :: --- BATCH SCRIPT START --- :: --- Batch File to Copy and create new folder for Photo Backup's --- :: --- Created By: Me --- @[u][url="http://www.edugeek.net/member.php?u=16971"]echo[/url][/u] 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 --- 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. 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.
×
×
  • Create New...