Tom's Guide | Tom's Hardware | Tom's Games
![]() |
![]() |
![]() |
Hello
How can I rename file by date format?
I try use this batch which can work in Windows XP, but it cannot work in Windows 2000 Server. Please Help Me.
Rem Get Day,Mth & Year from %Date%
set Day=%Date:~0,2%
set Mth=%Date:~3,2%
set Yr=%Date:~6,4%
ren d:\backup\backupdata.zip %Yr%%Mth%%Day%.zip
THXswwong

Hi sw,
###################################
@echo off > quit.bat
@echo echo %%1 %%2 %%3 %%4 %%5 %%6 %%7 %%8 %%9 >> quit.batecho.
echo This is the world famous %0.bat
echo.
echo copyright 2004 ThaiGuides.com All rights reserved
echo.
echo Free for private use. Others email: Consult@ThaiGuides.com
echo.
echo built and tested on windoze 2000; may act funny on other versions
echo.
echo. Purpose is to rename a zip to today's date::*********************************************************************
if %1'==' quit syntax: %0 filename to rename
ren "%1" "%DATE%.zip"
#######################If you need the
YrMthDay
layout, let me know and I'll tweak it.
M2

![]() |
Device DELETED
|
outlook runtime error
|

This post is quite old and has been locked from receiving new replies. Please create a new posting instead.
| Ads by Google |