| Login

Search this Blog


Links I like to keep around




Here are the most recent postings to this blog. Use the archive calendar or search to find other entries.
Sep4

Written by:R Teachout
9/4/2007 11:43 AM

@echo off

:: Get Current Directory
SET UtilPath=%~dp0
:: Directory in current path to backup
SET DIR=SiteCode

:: ReSet Date Variable to be YYYY-MM-DD-WKD from WKD-MM-DD-YYYY
set DATE=%DATE:/=-%
set DATE=%DATE: =-%
for /f "tokens=1,2,3,4 delims=-" %%a in ("%DATE%") do set wday=%%a&set month=%%b&set day=%%c&set year=%%d
set DATEVAR=%year%-%month%-%day%-%wday%

:: Make Sure destination folder exists..
mkdir "%UtilPath%Backup-%DATEVAR%"
:: Actual Backup Code using robocopy
robocopy /e /s "%UtilPath%%DIR%" "%UtilPath%Backup-%DATEVAR%"

echo DONE
pause

Tags:

Your name:
Title:
Comment:
Security Code
Enter the code shown above in the box below
Add Comment   Cancel  

How much do Windows cost, and do you have to buy each one separately?
-Unknown

Inspired by Nina