The following line gets the date into a variable. I'm not sure about the
time.
FOR /F "tokens=1-4 delims=/ " %%I IN ('DATE /t') DO SET mydate=%%L-%%J-%%K
REM following line should output 2005-06-15
echo %mydate%
pause
HTH,
Toby
----- Original Message -----
From: "les_claypoo1" <[EMAIL PROTECTED]>
To: <[email protected]>
Sent: Wednesday, June 15, 2005 1:27 PM
Subject: [AccessDevelopers] Creating a batch file to rename my DB
> I want to use a batch file to rename my db to include the date&time on
> the end of it in this format.
>
> ORGINAL NAME: mydatabase.mdb
>
> NEW NAME: mydatabase-2005-06-15T12;25;15.mdb
> [filename]-yyyy-mm-ddThh;mm;ss.mdb
>
> Any hints or helpful webpages would be great. thanks
>
>
>
>
>
> Please zip all files prior to uploading to Files section.
> Yahoo! Groups Links
>
>
>
>
>
>
>
Please zip all files prior to uploading to Files section.
Yahoo! Groups Links
<*> To visit your group on the web, go to:
http://groups.yahoo.com/group/AccessDevelopers/
<*> To unsubscribe from this group, send an email to:
[EMAIL PROTECTED]
<*> Your use of Yahoo! Groups is subject to:
http://docs.yahoo.com/info/terms/