HTTP Logs

john

Splendid
Aug 25, 2003
3,819
0
22,780
Archived from groups: microsoft.public.win2000.general (More info?)

Hi All, my web server logs are located in f\Logs\W3SVC1\exyymmdd.log. Every
time the new log file is created on 12.00 AM for one server, 1.00 am for one
server.

I Want to copy these files to my SQL Server drive, whcih i can run DTS job
to pull the data and put it into SQL Server.

i am using XCOPY In my batch file to copy .log file from one server to
another server. how can i put code exactly as it should took file on daily
basis(i mean todays date: ex050334.log)

please advise me.

Thanks,

John.
 
Archived from groups: microsoft.public.win2000.general (More info?)

add this to the top of your batch file.
to set file name to date- %xdate%.log
to set file name to time- %xtime%.log
to set file name to time and date- %xtime%%xdate%.log
ex.date= 03-23-2005.log
ex.time= 16.30.log
ex.time & date= 16.30 03-23-2005.log

------------------------------------------------------------------------------------------------
@echo off
setlocal
for /f "tokens=2-4 delims=/ " %%a in (
'date /t'
) do set xdate=%%a-%%b-%%c
for /f "tokens=5-6 delims=:. " %%a in (
'echo/^|time^|find "current"'
) do set xtime=%%a.%%b
cls
------------------------------------------------------------------------------------------------

hope this helps. let me know if you have any problems...




"John" wrote:

> Hi All, my web server logs are located in f\Logs\W3SVC1\exyymmdd.log. Every
> time the new log file is created on 12.00 AM for one server, 1.00 am for one
> server.
>
> I Want to copy these files to my SQL Server drive, whcih i can run DTS job
> to pull the data and put it into SQL Server.
>
> i am using XCOPY In my batch file to copy .log file from one server to
> another server. how can i put code exactly as it should took file on daily
> basis(i mean todays date: ex050334.log)
>
> please advise me.
>
> Thanks,
>
> John.
>
>