Grayson Lee
New Member
- Joined
- Feb 9, 2010
Hello:
This is my first time posting here. Thanks in advance for any assistance.
I have a batch file that worked faithfully in Windows XP. I wish to update the code to work in Windows 7 Ultimate (64-bit).
The code creates a folder with a date in its name. the code is as follows:
@echo off
cls
:: Create environment variables with today's date values.
setlocal
for /f "tokens=1-4 delims=/ " %%i in ('date /t') do (
set Day=%%i
set MM=%%j
set DD=%%k
set YYYY=%%l
)
:: Create backup folder with today's date and move disk image to backup folder.
md D:\Backup\-- F-BU
In Windows XP, a folder with path D:\Backup\2010-02-09 F-BU would be created.
However, when I run the code in Windows 7, I get a folder with path and name as follows: D:\Backup\-- F-BU
If anyone could please help me out, it would be greatly appreciated.
Thanks,
Grayson
This is my first time posting here. Thanks in advance for any assistance.
I have a batch file that worked faithfully in Windows XP. I wish to update the code to work in Windows 7 Ultimate (64-bit).
The code creates a folder with a date in its name. the code is as follows:
@echo off
cls
:: Create environment variables with today's date values.
setlocal
for /f "tokens=1-4 delims=/ " %%i in ('date /t') do (
set Day=%%i
set MM=%%j
set DD=%%k
set YYYY=%%l
)
:: Create backup folder with today's date and move disk image to backup folder.
md D:\Backup\-- F-BU
In Windows XP, a folder with path D:\Backup\2010-02-09 F-BU would be created.
However, when I run the code in Windows 7, I get a folder with path and name as follows: D:\Backup\-- F-BU
If anyone could please help me out, it would be greatly appreciated.
Thanks,
Grayson