@echo off rem code from http://stackoverflow.com/questions/11364147/setting-a-windows-batch-file-variable-to-the-day-of-the-week rem Make the win32_localtime output all one line, though some versions may contain blank lines as well. rem So ignore blank lines and just pick up the number after the equal sign. for /f "delims== tokens=2" %%a in ('wmic path win32_localtime get dayofweek /format:list') do ( rem Increment the DOW as it is documented to be a zero-based index starting with Sunday. set /a DayOfWeekIndex=%%a+1 ) rem Also get name day of week. The DOW coming in is now a one-based index. rem This is used to reference the "array" of week day names. set DayOfWeekNames=Sunday Monday Tueday Wednesday Thursday Friday Saturday for /f "tokens=%DayOfWeekIndex%" %%b in ("%DayOfWeekNames%") do ( set DayOfWeekName=%%b ) rem Next copy the Acronis backup file to new drive & rename if exist d:\Backup1\TestCopy*.tib del d:\Backup1\TestCopy*.tib if exist d:\Backup1\%DayOfWeekName%.tib del d:\Backup1\%DayOfWeekName%.tib copy d:\Backup\TestCopy*.tib d:\Backup1\ ren d:\Backup1\TestCopy*.tib %DayOfWeekName%.tib echo Acronis backup copied to %DayOfWeekName%.tib