My scripts to catalog and browse multiple drives

Plug-in and third party software discussion.
Post Reply
defc
Posts: 15
Joined: Fri May 29, 2020 9:31 pm

My scripts to catalog and browse multiple drives

Post by defc »

I've just started using Everything. I have a lot of external drives and this is a good tool to catalog them. I wrote a simple script that will catalog a attached hard drive to a efu file. I know this is already built in, what I added was to generate the file name using the drive label+serial number which makes it easy to identify.

Special thanks to member NotNull for his scripts!

My workflow :-

- attach external drives
- set env variable EFUPATH to e.g. d:\save\efu (defaults to .\efu)
- run listdrives.cmd - shows all attached physical drives
- for each of them run 'catd <drive>'
- backup efu folder to cloud (e.g. GDrive)
- run allefu.cmd to browse all combined efu's (this is very slightly tweaked version of NotNull's excellent masterefu.cmd, modified to read env variables)

Any suggestion is welcome. Perhaps the combined efu should also be stored on disk? (this will need change to masterEfu script). Another thing I am looking at is running this automatically whenever a new drive is inserted.
Attachments
myscripts.zip
(1.76 KiB) Downloaded 937 times
NotNull
Posts: 5461
Joined: Wed May 24, 2017 9:22 pm

Re: My scripts to catalog and browse multiple drives

Post by NotNull »

Not yet tested, but take a look at viewtopic.php?f=2&t=6162
(although that contains just other methods to do the same as you are already doing, so might not be useful after all :))
defc
Posts: 15
Joined: Fri May 29, 2020 9:31 pm

Re: My scripts to catalog and browse multiple drives

Post by defc »

So your script does a lot more and is obviously a bit more advanced, I'm learning a few things from it. I think I'll steal the code for drive label/enumerating (which I previously stole from stackoverflow :D) and some wmic tricks. Also I didn't now you could have exclude_folders etc in an ini file.

So you are storing everything in a separate database and invoke Everything with it. Is there any pro/con to this approach vs the one where you load an efu file? In both cases it will only use the contents of that db/efu right? I have it installed as service so don't need the portable functionality.

Is there anyway to browse with a tree? e.g. could you use the csv to generate a tree. e..g when I load the master efu made from ~10 drives, all of it will be loaded, and then to see contents of a disk I do 'filelistfilename:id'. I'm guessing same will be needed with the script above, but the drives will appear as a folder? Is there another way.

I enabled folder size indexing so I can see folder sizes, but I'm wondering how much that will slow things down?
science2002
Posts: 8
Joined: Fri Sep 22, 2017 10:34 am

Re: My scripts to catalog and browse multiple drives

Post by science2002 »

Thanks for your scripts. I tried them, but they did not work correctly, at least in Win 10.
Catd.cmd in particular failed, while allefu.cmd throws an error.
  • Catd.cmd failure:
    I realized after sometime why was so. When the OS is not in English the catd.cmd does not capture VolumeName and Serial correctly. The culprit is the command "for /f". In it, one needs to adjust the "tokens" (i.e. at which word to start capturing) as well as the words in "|find".
    To know exactly how the adjustment should be done, in the cmd prompt one can check with "vol <DriveLetter:>, like "vol D:". The result shows the VolumeName and the Serial with additional words in non-English language. I had problems in retriving both VolumeName and Serial using the original script. After the necessary adjustments the script worked ok.
  • Allefu.cmd error:
    It opens Everything in the MasterEfu window with the correct efu archives. However it gives the following warning (my Everything folder is placed in C:\Users\Test\My Portables\Everything and the path in file allefu.cmd was updated):
    "Unable to open file list: C:\Users\Test\My Portables\Everything is not a valid file list"
    After some attempts in tweaking the script, the error does not appear if one puts the double quotes "..." (given the presence of the space) in the efu folder path, EFUPATH.
Two final quests, only partially related with these scripts.
  • a) I notice an unexpected feature in Catd.cmd. It creates efu archives even if the given drive is in Fat, and the latter was not previously inclueded in the Options>Indexes>Folder. In my first attempts I was doing manually that inclusion, before running the script. It seems that there is no need to do that.
    On this regard, is there a way via command or via attribute to include a Fat drive in the normal Everything database, without going manually to Options? Searching in Everything help files (Command-line Options guide) I did not find such a command.
  • b) I see that Everything 1.5 alpha shows in Options - Indexes a specific tab for Fat drives. That is helpful to automatically include any Fat drive. Is there any timetable to beta or final release?
    Thank you
marcello
Posts: 1
Joined: Wed Nov 17, 2021 1:59 pm

Re: My scripts to catalog and browse multiple drives

Post by marcello »

Hi,
I've found your scripts and those of 'NotNull' very interesting. I will slowly study and use them.

I think it would be great to open a new topic around 'Offline Volumes' as I would love to see this feature a bit expanded and maybe even integrated in the UI. I know people beside me who crave for this feature. Maybe to open a little discussion around this could bring some useful ideas and making it doable without too much work.
(I'm new to this forum, I just came in in order to talk about this, but for this same reason I cannot open a new one, I understand).
defc
Posts: 15
Joined: Fri May 29, 2020 9:31 pm

Re: My scripts to catalog and browse multiple drives

Post by defc »

To science2002 and mcarcello,

I'm very sorry for the extremely late reply, I have not been able to use my pc for a long time due to other issues.

I see that there have been a many new changes in Everything since I wrote the scripts, I plan to make some improvements but also want to ask the author voidc for some advice.

I plan to make an update as soon as I can, thank you
Post Reply