Posted by Valerie on June 29, 2010 at 06:05:11:
In Reply to: Using DOS to Rename a folder in W7 posted by William Lockie on June 26, 2010 at 15:22:14:
Your date format is probably something like Tue 06/29/2010 and the Move command is expected to move the backup directory to another named Tue 06.29.2010 W7 which has not been created(?)
Suggest you try:
@echo off
setlocal enabledelayedexpansion
cls
set infile=D:\WindowsImageBackup
If exist %infile% (
set dirout=D:\%date:~-10%_W7
set dirout=!dirout:/=.!
md !dirout!
move %infile% !dirout!
) else (
echo %infile% does not exist
)
)
It has been preliminary tested in Win XP, should work on Win 7, leave the final testing to you.
Good luck.