Count files problem
Posted: 30 Jan 2014 09:54
I was checking my epubs directories, and identified a problem.
I have 4466 .epub files and in addition i have 4473 .opf files. My calibre software usually creates 1 .opf file for each .epub file all in individual sub directories - so it looks as if I have got 7 duplicate/extra opf files in error.
Calibre'smaintenance software check tells me that everything is OK, but that must almost certainly be wrong
It seems likely that the most obvious solution is that some folders have two or more .opf files (the other alternative is that there is no .epub file in a directory).
As a first check, I was hoping to write a batch file to check a parent directory plus all sub-directories. If there are any files in a directory, I would like to create a list of all directories where there is more than 1 .opf file, or less than 1 .epub file.
Writing this is beyond me however. I tried a few Google searches and although I found something close, I could not get near enough, or even get it to work so I could amend it.
I'd therefore appreciate any help to point me at a solution.
Many thanks
Colin
I have 4466 .epub files and in addition i have 4473 .opf files. My calibre software usually creates 1 .opf file for each .epub file all in individual sub directories - so it looks as if I have got 7 duplicate/extra opf files in error.
Calibre'smaintenance software check tells me that everything is OK, but that must almost certainly be wrong
It seems likely that the most obvious solution is that some folders have two or more .opf files (the other alternative is that there is no .epub file in a directory).
As a first check, I was hoping to write a batch file to check a parent directory plus all sub-directories. If there are any files in a directory, I would like to create a list of all directories where there is more than 1 .opf file, or less than 1 .epub file.
Writing this is beyond me however. I tried a few Google searches and although I found something close, I could not get near enough, or even get it to work so I could amend it.
I'd therefore appreciate any help to point me at a solution.
Many thanks
Colin