|
web
newsgroups
|
|||||||||||||||||||||||
|
|||||||||||||||||||||||
HTTP LogsHi 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. 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... Show quoteHide quote "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. > >
W2K & Hyperthreading w/ Intel
Last Known Good Configuration in W2K open containing folder Basic Disk Mirror Problem Copy a shortcut to desktop at startup logon failure Cannot log on Start-Up Failure; Cannot login successfully as computer will re-st Free disk space not availible for defrag. Users Recycler??? |
|||||||||||||||||||||||