More than 2 logs (1 Viewer)

rekenaar

Retired Team Member
  • Premium Supporter
  • December 17, 2006
    4,421
    805
    Home Country
    South Africa South Africa
    Silly me...of course!!!!

    Going to try to create the batch file now...
     

    rekenaar

    Retired Team Member
  • Premium Supporter
  • December 17, 2006
    4,421
    805
    Home Country
    South Africa South Africa
    Customize the following 2 lines according to your setup and it should work.
    It works nice on my XP.
    Code:
    set logsDir=C:\Documents and Settings\All Users\Application Data\Team MediaPortal\MediaPortal\log
    set mpDir=C:\Program Files\Team MediaPortal\MediaPortal
     

    Attachments

    • mp.zip
      30.6 KB

    rekenaar

    Retired Team Member
  • Premium Supporter
  • December 17, 2006
    4,421
    805
    Home Country
    South Africa South Africa
    replace the EXIT with PAUSE

    Run it again.
    Close MediaPortal
    Copy and paste the content of the command window here.

    I'll be back in a few hours.
     

    z3us

    Portal Pro
    December 4, 2007
    1,047
    123
    46
    Home Country
    Spain Spain
    With only the time it runs:
    rename MediaPortal.log MediaPortal_%time:~-11,2%%time:~-8,2%.log

    seems that there is a problem with the separator / of the date Is it possible to use another character?
    If not, renaming with time could be enough. Thanks
     

    rekenaar

    Retired Team Member
  • Premium Supporter
  • December 17, 2006
    4,421
    805
    Home Country
    South Africa South Africa
    might be a localization difference.

    Try the following in a batch file and post the result:
    echo %date%
    pause

    got to run now...be back later
     

    z3us

    Portal Pro
    December 4, 2007
    1,047
    123
    46
    Home Country
    Spain Spain
    I learned some basics and was able to create this batch:
    @echo off
    rem Add time to logfile name and move it to a folder with date in its name
    for /f "tokens=1-3 delims=/- " %%a in ('date /t') do set XDate=%%a-%%b-%%c

    for /f "tokens=1-2 delims=: " %%a in ('time /t') do set XTime=%%a.%%b
    echo %XDate% %Xtime%
    md "%xdate%"
    copy mediaportal.log "%xdate%"\mediaportal_"%xtime%".log

    It rocks, it renames the log to mediaportal_time and moves the log to a folder called with the date

    Thanks !:D
     

    rekenaar

    Retired Team Member
  • Premium Supporter
  • December 17, 2006
    4,421
    805
    Home Country
    South Africa South Africa
    well done
     

    Users who are viewing this thread

    Top Bottom