HTTP Logs

G

Guest

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
cl
------------------------------------------------------------------------------------------------

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

Thanks for the reply from Royce.

Can you please advise me my file is going to created by the time daily 1.00
am.
my file location is: F:\Logs\WWWLogs\W3SVC1\ex030527.LOG.

I am going to move this file from here to another location using XCOPY.

What points should i take care of, thanks for all.

John
 
G

Guest

john not exactly sure what your question is.... so your going to move the
file from one location to another using xcopy? why couldnt you just make the
log in the correct location the first time... im not very clear on all of
this. is there something that im missing?
 
G

Guest

i mean i am copiying the log file into another server Royce. thats why i am
using XCOPY.

thank you very much for yoru help.

can you please help me in this scenario.
 
G

Guest

do you want the log(s) to be on both servers? can you post a copy of your
batch or what you have so far?
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Similar Threads

HTTP Logs 1
Last number in IP Address 1
Problem with DOS batch file - FOR loop 13
Date format wrong 2
ntbackup force overwrite 5
NTbackup problem 6
Batch file rename and copy 0
Bug in FOR command of cmd.exe 2

Top