Hi,
to rename a file you can use:
rename file.log "%date%".log
Change only file.log name to match name of the file that you would like to
rename...
--
Mike
Microsoft MVP - Windows Security
"Bob2705" <(E-Mail Removed)> wrote in message
news:3821A2C4-B9F1-481F-954A-(E-Mail Removed)...
> Hi Milna,
>
> When I use the %date% in the rename command or the copy command it doesn't
> work. How do I get it to see the space after the day?
>
>
> "Miha Pihler [MVP]" wrote:
>
>> Hi,
>>
>> You could write a script that would e.g. on Tue copy log file from Mon to
>> another location and rename it to e.g. Mon 17.10.05.log. That would
>> prevent
>> the log file from being overwritten and you could keep it for longer
>> period
>> of time.
>>
>> --
>> Mike
>> Microsoft MVP - Windows Security
>>
>> "Bob2705" <(E-Mail Removed)> wrote in message
>> news:9919A96A-2DF6-4364-A41B-(E-Mail Removed)...
>> > Does anyone know how to save the DHCP logfiles ? They get overwritten
>> > after
>> > each week and was wondering how to save them automatically for longer
>> > periods
>> > of time ?
>> >
>> > Thanks
>> >
>>
>>
>>
|