you can use this in your script in place of nd.exe:

:: Display current time
NET TIME \\%computername% | findstr "Current"

for /f "tokens=6-11 delims=/:. " %%a in ('net time \\%computername%') do (
     (set month=%%a) & (set day=%%b) & (set year=%%c)
     (set hh=%%d)    & (set min=%%e) & (set AMorPM=%%f)
)

:: combine all variables to give the required DATEVAR, add %hh% and %mm% for
hour/min
set datevar=%year%%month%%day%
echo Date/time variable is %datevar%

then use a ren statement to rename imailreg.bkp to imailreg_%datevar%.bkp or
whatever

-----Original Message-----
From: [EMAIL PROTECTED]
[mailto:[EMAIL PROTECTED]]On Behalf Of florida.com
Sent: Monday, September 24, 2001 2:09 PM
To: [EMAIL PROTECTED]
Subject: RE: [IMail Forum] auto backup registry


Hi--

What is the name of nd.exe--- did a search on google and came up empty.





> -----Original Message-----
> From: [EMAIL PROTECTED]
> [mailto:[EMAIL PROTECTED]] On Behalf Of Kris McElroy
> Sent: Monday, September 24, 2001 11:57 AM
> To: [EMAIL PROTECTED]
> Subject: Re: [IMail Forum] auto backup registry
>
>
> I use the following (nd.exe is a freeware program for
> renaming the file to a specified date format).  I schedule it
> in MSTASK to be ran every day @ 3:00AM I have been running it
> for about three months now with no problems:
>
>
> REM ------------------------------------------------------------
> REM  should export the Imail database from the registry
> REM and output it to imailreg.bkp then we should rename
> REM the file with the current system date and different
> REM extension so that we can't click on the file and
> REM accidentally import it into the registry.  This
> REM utility should be ran everynight to ensure that the
> REM imail registry is properly backed up.
> REM -------------------------------------------------------------
>
>
> @echo off
>
>
>
> regedit /e c:\utils\imailreg.bkp HKEY_LOCAL_MACHINE\SOFTWARE\IPSWITCH
>
>
> move c:\utils\imailreg.bkp Z:\imailreg.bkp
> nd /f=mmddyyyy z:\imailreg.bkp
>
>
> NET SEND primary_imail NOTICE -  Imail Registry Exported Successfully
>
>
>
>
>
> Thanks,
>
>
> Kris McElroy
> [EMAIL PROTECTED]
>
> Internet Systems Engineer
> Duracom, INC.
>
> ----- Original Message -----
> From: "florida.com" <[EMAIL PROTECTED]>
> To: <[EMAIL PROTECTED]>
> Sent: Monday, September 24, 2001 10:38 AM
> Subject: [IMail Forum] auto backup registry
>
>
> > How would I create a batch file to automatically backup the imail
> > registry?
> >
> >
> >
> > PS. Great Hotel and Condo Deals *WorldWide* are found at
> http://www.FLORIDA.com
> >
> > Please visit http://www.ipswitch.com/support/mailing-lists.html
> > to be removed from this list.
> >
> > An Archive of this list is available at:
> > http://www.mail-archive.com/imail_forum%40list.ipswitch.com/
> >
>
>
> Please visit http://www.ipswitch.com/support/mailing-lists.html
> to be removed from this list.
>
> An Archive of this list is available at:
> http://www.mail-archive.com/imail_forum%> 40list.ipswitch.com/
>


PS. Great Hotel and Condo Deals *WorldWide* are found at
http://www.FLORIDA.com

Please visit http://www.ipswitch.com/support/mailing-lists.html
to be removed from this list.

An Archive of this list is available at:
http://www.mail-archive.com/imail_forum%40list.ipswitch.com/


Please visit http://www.ipswitch.com/support/mailing-lists.html 
to be removed from this list.

An Archive of this list is available at:
http://www.mail-archive.com/imail_forum%40list.ipswitch.com/

Reply via email to