delete unnecessary xml files in recording folder automatically

Discussion in 'Other HTPC Applications (no support)' started by olli14, June 20, 2012.

  1. olli14 Portal Pro

    System Specs
    Hello community,
    most of my recorded movies (in the folder "recorded tv") I move into the folder "movies". This folder "movies" is monitored by moving pictures. My problem ist now that there are many xml files left in the folder "recorded tv" that I don't need anymore. Is there a batch file that I can start e.g. every week that deletes automatically all unnecessary xml files?

    olli14
    • Premium Supporter

    tomtj MP Donator

    System Specs
    Hi okki14,
    Unless I am misunderstanding, I think this would do what you want. Place this command in a bat file, and then use the windows scheduler to run as desired. Have I got it right ?

    >del /q "c:\Recorded TV\*.xml"

    You can see further options if you open up a dos command prompt and enter "help del"

    Tony
  2. olli14 Thread Starter Portal Pro

    System Specs
    Hi tomtj,
    thanks for your answer but I think you didn't understand me. Some of my recorded movies I move to the folder "movies" and the depending xml files stays in the folder "recorded tv". But these xml files I don't need anymore so I want to delete only these xml files without existing ts files in the same folder. E.g. I have the file "highlander.ts" and "highlander.xml" in the folder "recorded tv". I move the file "highlander.ts" to another folder. So I don't need anymore the file "highlander.xml" in the folder "recorded tv" and I want to delete this file.

    I hope I could explain what's my problem. German is not my native language.

    Greetings
    olli14
    • Premium Supporter

    tomtj MP Donator

    System Specs
    Hi Olli,
    I understand more clearly what you are trying to do now. Sorry, but that's beyond my ability as well. I hope maybe somebody has already built this, or can be of more help than I can.

    Tony
  3. olli14 Thread Starter Portal Pro

    System Specs
    Hi tomtj and all the others,
    somewhere in the web I have found this batch file. This should do what I want. But it doesn't. Does this batch file help someone to make this batch work.
    f:
    cd \Recorded TV
    FOR %%I IN (*.*) DO IF NOT EXIST "%%~dI%%~pI%%~nI.ts" (
    del %%~nI.txt
    del %%~nI.xml
    del %%~nI.edl
    del %%~nI.incommercial
    )
  4. olli14 Thread Starter Portal Pro

    System Specs
    Great,this script is working

    FOR %%I IN (*.*) DO IF NOT EXIST "%%~dI%%~pI%%~nI.ts" (
    del %%~nI.*
    )
    exit
    Thanks for the links, usualsuspect!
    olli14

Share This Page

Users Viewing Thread (Users: 0, Guests: 0)

Running the latest version?

V1.3.0 FINAL - released March 2013
Releasenews | Download
Changelog
 | Requirements
HTPC
Team-MediaPortal
 
About
Contact |  Press
Partners