delete unnecessary xml files in recording folder automatically

olli14

Portal Pro
December 17, 2008
738
18
Country flag
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
 

tomtj

MP Donator
  • Premium Supporter
  • March 18, 2012
    56
    8
    NW Chicago suburbs
    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
     
    Last edited:

    olli14

    Portal Pro
    December 17, 2008
    738
    18
    Country flag
    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
     

    tomtj

    MP Donator
  • Premium Supporter
  • March 18, 2012
    56
    8
    NW Chicago suburbs
    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
     

    olli14

    Portal Pro
    December 17, 2008
    738
    18
    Country flag
    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
    )
     

    olli14

    Portal Pro
    December 17, 2008
    738
    18
    Country flag
    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
     
    Thread starter Similar threads Forum Replies Date
    P Other HTPC Applications 3
    Top Bottom