Looking for program

Chat with other TGB members about whatever is on your mind.
Rickt1962

Posts: 160
Joined: Tue Nov 19, 2013 5:40 pm
Location:

HTPC Specs: Show details

Looking for program

#1

Post by Rickt1962 » Sat May 11, 2019 9:15 pm

I have well over 6300 movies and noticed some are missing ! I am the only one allowed to add or delete Movies to my NAS is there a program that can scan my Library to give me a record what I have and so I can check it again in 6 months to see if any disappeared ?
HTPC W7 pro with HDhomerun with 6 tuners using Comcast scanned by MCEbuddy uploaded to network to be watched by KODI

Space

Posts: 2838
Joined: Sun Jun 02, 2013 9:44 pm
Location:

HTPC Specs: Show details

#2

Post by Space » Sun May 12, 2019 1:26 am

Well, I'm not familiar with a program that will do exactly what you want, maybe someone else here will be able to help with that, but I do have one solution for you...

If you want to monitor, for example, folder "C:\videos" (and all sub-folders) you can take a snapshot of the list of files in that folder and save it to a text file, then later, you can do the same thing, and save it to a different text file. You can then use one of the many free file compare programs out there to compare those two files.

Example:

Open a cmd prompt and type:
tree C:\videos /F /A > capture1.txt
Then at a later date, to see if any files have been added or removed, run this again, only use a different filename:
tree C:\videos /F /A > capture2.txt
Now you can compare file capture1.txt to file capture2.txt with a free file compare utility such as Winmerge. It should tell you any files that were added/deleted.

Rickt1962

Posts: 160
Joined: Tue Nov 19, 2013 5:40 pm
Location:

HTPC Specs: Show details

#3

Post by Rickt1962 » Sun May 12, 2019 12:22 pm

Access denied tree U:\Movies /F /A > capture1.txt

Its a mapped network drive
HTPC W7 pro with HDhomerun with 6 tuners using Comcast scanned by MCEbuddy uploaded to network to be watched by KODI

User avatar
StinkyImp

Posts: 669
Joined: Thu May 11, 2017 7:53 pm
Location:

HTPC Specs: Show details

#4

Post by StinkyImp » Sun May 12, 2019 2:54 pm

Rickt1962 wrote: Sun May 12, 2019 12:22 pm Access denied tree U:\Movies /F /A > capture1.txt

Its a mapped network drive
How's your directory structure set up? For a few years I've been thinking about writing a utility that can take a snapshot of my directory structure and then compare it to a previous time period (for additions and deletions).

My structure for movies and TV shows are:

U:\Movies\(Movie Name)
U:\TV Shows\(TV Show Name)

Where each "Movie" or "TV Show" is in its own sub-directory.

If your structure is the same (or similar) I may give it a shot.

Rickt1962

Posts: 160
Joined: Tue Nov 19, 2013 5:40 pm
Location:

HTPC Specs: Show details

#5

Post by Rickt1962 » Sun May 12, 2019 7:13 pm

StinkyImp wrote: Sun May 12, 2019 2:54 pm
Rickt1962 wrote: Sun May 12, 2019 12:22 pm Access denied tree U:\Movies /F /A > capture1.txt

Its a mapped network drive
How's your directory structure set up? For a few years I've been thinking about writing a utility that can take a snapshot of my directory structure and then compare it to a previous time period (for additions and deletions).

My structure for movies and TV shows are:

U:\Movies\(Movie Name)
U:\TV Shows\(TV Show Name)

Where each "Movie" or "TV Show" is in its own sub-directory.

If your structure is the same (or similar) I may give it a shot.
That is exactly how mine looks like on each mapped drive U:\Movies\(Movie Name)
U:\TV Shows\(TV Show Name) and 3 more drives looking the same


This all got started when I noticed Smokey and the Bandit was missing ! I knew for sure I used to have it and to prove it I called my son who I gave a backup drive to. And he had it !
HTPC W7 pro with HDhomerun with 6 tuners using Comcast scanned by MCEbuddy uploaded to network to be watched by KODI

Space

Posts: 2838
Joined: Sun Jun 02, 2013 9:44 pm
Location:

HTPC Specs: Show details

#6

Post by Space » Sun May 12, 2019 7:19 pm

Rickt1962 wrote: Sun May 12, 2019 12:22 pm Access denied tree U:\Movies /F /A > capture1.txt

Its a mapped network drive
Are you able to list the files in that folder without the redirect to a text file?

dir U:\Movies

or

tree U:\Movies

If so, are you able to write to the folder you were in when you ran the one where you got the error? It is trying to write to a file in the current folder, so if you don't have write permissions it won't work.

You can use the full path to the text file if you don't want to "CD" to the folder before running the command:

tree U:\Movies /F /A > C:\foldername1\foldername2\capture1.txt

Or you can first "cd" to the "U:\Movies" folder and not specify the source folder like this:

cd U:\Movies
tree /F /A > C:\foldername1\foldername2\capture1.txt

But you will have to have write permissions on the folder path you specify.

Another thing you can try is to run CMD as an administrator before running the command, although I am not very familiar with Windows file permissions and if that will have any effect.

Rickt1962

Posts: 160
Joined: Tue Nov 19, 2013 5:40 pm
Location:

HTPC Specs: Show details

#7

Post by Rickt1962 » Sun May 12, 2019 11:20 pm

Space wrote: Sun May 12, 2019 7:19 pm
Rickt1962 wrote: Sun May 12, 2019 12:22 pm Access denied tree U:\Movies /F /A > capture1.txt

Its a mapped network drive
Are you able to list the files in that folder without the redirect to a text file?

dir U:\Movies

or

tree U:\Movies

If so, are you able to write to the folder you were in when you ran the one where you got the error? It is trying to write to a file in the current folder, so if you don't have write permissions it won't work.

You can use the full path to the text file if you don't want to "CD" to the folder before running the command:

tree U:\Movies /F /A > C:\foldername1\foldername2\capture1.txt

Or you can first "cd" to the "U:\Movies" folder and not specify the source folder like this:

cd U:\Movies
tree /F /A > C:\foldername1\foldername2\capture1.txt

But you will have to have write permissions on the folder path you specify.

Another thing you can try is to run CMD as an administrator before running the command, although I am not very familiar with Windows file permissions and if that will have any effect.
Thanks for helping ! I tried under admin CMD and drive is unspecified
HTPC W7 pro with HDhomerun with 6 tuners using Comcast scanned by MCEbuddy uploaded to network to be watched by KODI

Space

Posts: 2838
Joined: Sun Jun 02, 2013 9:44 pm
Location:

HTPC Specs: Show details

#8

Post by Space » Mon May 13, 2019 1:55 am

Are you able to view the files in Windows Explorer?

User avatar
Scallica

Posts: 2797
Joined: Mon Jun 06, 2011 7:09 pm
Location: USA!

HTPC Specs: Show details

#9

Post by Scallica » Mon May 13, 2019 11:57 am

Why not use Plex or Emby for movie management? Both have a counter for the total number of titles in a collection. I'm pretty sure both have a rolling log file that documents when new titles are added and when titles are removed from the library. Both are free.
HTPC Enthusiast / Forum Moderator - TGB.tv Code of Conduct

User avatar
StinkyImp

Posts: 669
Joined: Thu May 11, 2017 7:53 pm
Location:

HTPC Specs: Show details

#10

Post by StinkyImp » Mon May 13, 2019 3:42 pm

Space wrote: Sun May 12, 2019 1:26 amNow you can compare file capture1.txt to file capture2.txt with a free file compare utility such as Winmerge. It should tell you any files that were added/deleted.
Scallica wrote: Mon May 13, 2019 11:57 am Why not use Plex or Emby for movie management? Both have a counter for the total number of titles in a collection. I'm pretty sure both have a rolling log file that documents when new titles are added and when titles are removed from the library. Both are free.
This is why I love this forum. It's chock full of useful advice for just about anything obscure we might come across. This particular issue has perplexed me a number of times over the years. The only caveat is that it only rears its ugly head once (maybe twice) a year, so it goes unattended.
Rickt1962's inquiry prodded me just enough to try to tackle this dilemma.

I like Scallica's suggestion because if Plex or Emby already log additions and deletions from your library, it would be simple enough to search for them. Unfortunately, I don't use either of these. The difficulty with any potential solution is that they'd start at square one (the installation date) anyway. There's no mechanism I can easily find to look back in time to see what occurred with the file structure or library. If that's an option for you, it may be worth looking in to.

I started working on a utility that would take a snapshot of a directory and then create a timestamped version to compare to a future snapshot. The only caveat? It starts with a current snapshot. There's no historical data... but in the future I'll have a reference point!

All of my hard drives physically exist in/on my HTPC so my utility runs locally on the actual machine, not through mapped drives. The way I see it, it's a simple process.
  1. Create a snapshot of the "Movies", "TV Shows" or any other directory. (Completed)
  2. Select two snapshots to compare. (Completed)
  3. Analyze those two snapshots for differences. (In Process)
Image

Item 3 is where I'm currently working. I spent a few hours yesterday designing an engine that would compare the two files but it just wasn't as fast or efficient as I thought it should be. That's when I thought, "Why try to reinvent the wheel?" and I decided to give Space's suggestion a try. It only took a few minutes to download and extract the WinMerge binary to a folder, double-click on it, open my two snapshots, and voilà, instant gratification!
Image
For the next few days I won't have any time to devote to this project but I'll probably look at the WinMerge CLI options and then have the utility open the selected snapshots directly in WinMerge and call it done.

Rickt1962

Posts: 160
Joined: Tue Nov 19, 2013 5:40 pm
Location:

HTPC Specs: Show details

#11

Post by Rickt1962 » Mon May 13, 2019 5:28 pm

Scallica wrote: Mon May 13, 2019 11:57 am Why not use Plex or Emby for movie management? Both have a counter for the total number of titles in a collection. I'm pretty sure both have a rolling log file that documents when new titles are added and when titles are removed from the library. Both are free.
I have used Plex and Ember Media Manager and currently use KODI yes they all Log your library none will tell you which is missing. Just give you a total of how many you have.
HTPC W7 pro with HDhomerun with 6 tuners using Comcast scanned by MCEbuddy uploaded to network to be watched by KODI

Rickt1962

Posts: 160
Joined: Tue Nov 19, 2013 5:40 pm
Location:

HTPC Specs: Show details

#12

Post by Rickt1962 » Mon May 13, 2019 5:31 pm

StinkyImp wrote: Mon May 13, 2019 3:42 pm
This is why I love this forum. It's chock full of useful advice for just about anything obscure we might come across. This particular issue has perplexed me a number of times over the years. The only caveat is that it only rears its ugly head once (maybe twice) a year, so it goes unattended.
Rickt1962's inquiry prodded me just enough to try to tackle this dilemma.

I like Scallica's suggestion because if Plex or Emby already log additions and deletions from your library, it would be simple enough to search for them. Unfortunately, I don't use either of these. The difficulty with any potential solution is that they'd start at square one (the installation date) anyway. There's no mechanism I can easily find to look back in time to see what occurred with the file structure or library. If that's an option for you, it may be worth looking in to.

I started working on a utility that would take a snapshot of a directory and then create a timestamped version to compare to a future snapshot. The only caveat? It starts with a current snapshot. There's no historical data... but in the future I'll have a reference point!

All of my hard drives physically exist in/on my HTPC so my utility runs locally on the actual machine, not through mapped drives. The way I see it, it's a simple process.
  1. Create a snapshot of the "Movies", "TV Shows" or any other directory. (Completed)
  2. Select two snapshots to compare. (Completed)
  3. Analyze those two snapshots for differences. (In Process)
Image

Item 3 is where I'm currently working. I spent a few hours yesterday designing an engine that would compare the two files but it just wasn't as fast or efficient as I thought it should be. That's when I thought, "Why try to reinvent the wheel?" and I decided to give Space's suggestion a try. It only took a few minutes to download and extract the WinMerge binary to a folder, double-click on it, open my two snapshots, and voilà, instant gratification!
Image
For the next few days I won't have any time to devote to this project but I'll probably look at the WinMerge CLI options and then have the utility open the selected snapshots directly in WinMerge and call it done.
Thank you we are on the same page !
HTPC W7 pro with HDhomerun with 6 tuners using Comcast scanned by MCEbuddy uploaded to network to be watched by KODI

User avatar
StinkyImp

Posts: 669
Joined: Thu May 11, 2017 7:53 pm
Location:

HTPC Specs: Show details

#13

Post by StinkyImp » Thu May 16, 2019 11:57 pm

Rickt1962 wrote: Mon May 13, 2019 5:31 pm Thank you we are on the same page !
I PM'd you a temporary link to this utility. Just pull the folder out of the zip file (after you unblock it) and put it anywhere you want.

Double click on "Directory Compare.exe" and enjoy!

User avatar
StinkyImp

Posts: 669
Joined: Thu May 11, 2017 7:53 pm
Location:

HTPC Specs: Show details

#14

Post by StinkyImp » Sat May 18, 2019 6:22 pm

The link I sent you was "temporary" and appears to have expired. It was sent with Firefox Send which deletes the file after 24 hours or 1 download (whichever occurs first).

If you'd like to give this a try, let me know and I'll send you another "temporary" link.

User avatar
StinkyImp

Posts: 669
Joined: Thu May 11, 2017 7:53 pm
Location:

HTPC Specs: Show details

#15

Post by StinkyImp » Sun May 26, 2019 7:16 pm

Rickt1962 wrote: Sat May 11, 2019 9:15 pm I have well over 6300 movies and noticed some are missing ! I am the only one allowed to add or delete Movies to my NAS is there a program that can scan my Library to give me a record what I have and so I can check it again in 6 months to see if any disappeared ?
What did you come up with as your solution? I'd like to take a look at it and see if I can incorporate some other useful features in mine.

I've been running my "home grown" utility for a few weeks and it seems to be working great. I ended up baking the WinMerge binaries into it so it's a fully self-contained system that needs no additional software. I also had it report the total number of movies on the first line so I can tell at a glance how many net additions and deletions occurred since the last snapshot.

Rickt1962

Posts: 160
Joined: Tue Nov 19, 2013 5:40 pm
Location:

HTPC Specs: Show details

#16

Post by Rickt1962 » Wed Jun 05, 2019 12:25 pm

StinkyImp wrote: Sun May 26, 2019 7:16 pm
Rickt1962 wrote: Sat May 11, 2019 9:15 pm I have well over 6300 movies and noticed some are missing ! I am the only one allowed to add or delete Movies to my NAS is there a program that can scan my Library to give me a record what I have and so I can check it again in 6 months to see if any disappeared ?
What did you come up with as your solution? I'd like to take a look at it and see if I can incorporate some other useful features in mine.

I've been running my "home grown" utility for a few weeks and it seems to be working great. I ended up baking the WinMerge binaries into it so it's a fully self-contained system that needs no additional software. I also had it report the total number of movies on the first line so I can tell at a glance how many net additions and deletions occurred since the last snapshot.
Sorry was a way for a month taking care of family. I am back now :)
HTPC W7 pro with HDhomerun with 6 tuners using Comcast scanned by MCEbuddy uploaded to network to be watched by KODI

User avatar
StinkyImp

Posts: 669
Joined: Thu May 11, 2017 7:53 pm
Location:

HTPC Specs: Show details

#17

Post by StinkyImp » Wed Jun 05, 2019 2:54 pm

Rickt1962 wrote: Sat May 11, 2019 9:15 pmSorry was a way for a month taking care of family. I am back now :)
I'm sorry to hear that. I hope everything's ok now.

Did you end up finding something that would do what you wanted? Or were you wanting to be a "guinea pig" for my home brew solution?

EDIT: I responded to your PM.

Rickt1962

Posts: 160
Joined: Tue Nov 19, 2013 5:40 pm
Location:

HTPC Specs: Show details

#18

Post by Rickt1962 » Mon Jun 10, 2019 12:53 pm

StinkyImp wrote: Wed Jun 05, 2019 2:54 pm
Rickt1962 wrote: Sat May 11, 2019 9:15 pmSorry was a way for a month taking care of family. I am back now :)
I'm sorry to hear that. I hope everything's ok now.

Did you end up finding something that would do what you wanted? Or were you wanting to be a "guinea pig" for my home brew solution?

EDIT: I responded to your PM.
Could not get the link to work :oops:
HTPC W7 pro with HDhomerun with 6 tuners using Comcast scanned by MCEbuddy uploaded to network to be watched by KODI

User avatar
StinkyImp

Posts: 669
Joined: Thu May 11, 2017 7:53 pm
Location:

HTPC Specs: Show details

#19

Post by StinkyImp » Mon Jun 10, 2019 1:31 pm

Rickt1962 wrote: Sat May 11, 2019 9:15 pmCould not get the link to work :oops:
Hi Rickt1962!

I've tried sending you updated links but they keep expiring. As I mentioned before, I'm sending it with "Firefox Send" which only keeps the download active for 24 hours or one download, whichever occurs first. After that it disappears.

I just PM'd you a new link. Please download it within the next 24 hours.

EDIT: I uploaded a 64 bit version that appears to overcome some UAC issues with mapped drives. I think that's why you couldn't "print" a directory list manually per Space's instructions.

If you need a 32 bit version, let me know.

User avatar
StinkyImp

Posts: 669
Joined: Thu May 11, 2017 7:53 pm
Location:

HTPC Specs: Show details

#20

Post by StinkyImp » Tue Jun 18, 2019 3:50 pm

StinkyImp wrote: Mon Jun 10, 2019 1:31 pmI just PM'd you a new link. Please download it within the next 24 hours.
Hi Rickt1962!

I haven't heard back from you. Were you able to download this utility?

It's actually custom built for my specific setup so I'm curious if it worked on yours. If you successfully downloaded it, what has been your experience? Can you provide any suggestions for improvements or enhancements? Did it even work?

Thank you for any feedback you can provide!

PS - I've been using it since May 13th (when I made my first snapshot) and it has worked for me without fail so far. :angel:

Post Reply