File/Folder Tagging

Have a suggestion for "Everything"? Please post it here.
Post Reply
phlfm
Posts: 2
Joined: Thu Jul 13, 2017 2:04 am

File/Folder Tagging

Post by phlfm »

Well, everything is my... everything. I no longer use explorer, it is FANTASTIC.
But I have MANY files that fall into more than one category, something that Windows folders doesn't contemplate.

I have tried many tagging alternatives but none of them are satisfactory. If Everything had an option to tag files in its database (and track when a file changes location without losing its tag) that would be simply wonderful! (And something I expect would take only a few lines of code to implement - except maybe the file tracking)
:D
NotNull
Posts: 5517
Joined: Wed May 24, 2017 9:22 pm

Re: File/Folder Tagging

Post by NotNull »

phlfm wrote:I have tried many tagging alternatives but none of them are satisfactory.
I'm curious: what alternatives did you try and why weren't they what you were looking for?
phlfm
Posts: 2
Joined: Thu Jul 13, 2017 2:04 am

Re: File/Folder Tagging

Post by phlfm »

NotNull wrote:
phlfm wrote:I have tried many tagging alternatives but none of them are satisfactory.
I'm curious: what alternatives did you try and why weren't they what you were looking for?
I tried Tabbles and it was the best** I could find but I found it too bloated / heavy, doesn't track file changes when they move / are deleted.
I feel tabbles focused too much on making it look nice and that made it slow in code performance and in usability performance.

I also tried a few others that I don't remember their names, sorry :/

**Actually, the best I could find worked great but it put the tags in the FILENAMES! DDD:
DSC003.jpg became something like DSC003[Photo][Personal][Trip][Argentina][Me][Brother].jpg

The best would be something simple as is "Everything". Just a tagging system very similar to explorer folders but that allows a file to be in more than one "folder" at a time. That plus Everything's speedy search would mean the world to me. With everything I don't use explorer any more. Just press my hotkey and type in the file I want.
NotNull
Posts: 5517
Joined: Wed May 24, 2017 9:22 pm

Re: File/Folder Tagging

Post by NotNull »

Thank for feedback. Appreciated!

Tabbles looks interesting, but the need for a SQL server makes it rather (unnecessary imo) heavy. I like the concept, though.
Stamimail
Posts: 1122
Joined: Sat Aug 31, 2013 9:05 pm

Re: File/Folder Tagging

Post by Stamimail »

NotNull
Posts: 5517
Joined: Wed May 24, 2017 9:22 pm

Re: File/Folder Tagging

Post by NotNull »

You always come up with interesting threads. Thanks! (again)

Some time ago I "investigated" metadata/tagging. I think I will post those thoughts on these forums as it is a recurring subject lately (and earlier in time too, as we know now thanks to your link). Might take a while, though.
Stamimail
Posts: 1122
Joined: Sat Aug 31, 2013 9:05 pm

Re: File/Folder Tagging

Post by Stamimail »

There was one more discussion about tags I can remember
http://www.voidtools.com/forum/viewtopic.php?f=4&t=5453
I always wanted to ask and investigate what the best could be done regarding tags.
I think I stopped where I couldn't decide what's the right solution. Each method (where the tags are stored) has its drawback.
On the one hand,
I want the Tags will be kept even though I renaming the files or moving them to other location, as long as they on my local machine.
On the other hand,
I don't want the Tagging will change the binary of the files. It's important to me to be able to use Compare or Duplicate Cleaner/Remover program later...
There are also other requirements like the ability to tag folders and to work in x64 [I even thought about FullTextTag or CommentAttached such as attaching lyrics to songs/audio files], but this is the main thing.
Do you think the right solution for Tags requires creating a new file system?
P0t
Posts: 1
Joined: Wed Dec 20, 2017 10:31 pm

Re: File/Folder Tagging

Post by P0t »

Hello
Im also looking forward to a feature like that.So far i tested tagflow/tagspaces and tabbles.
Must say tabbles is the best so far.Kind of a file explorer with adding tags to files.It also keeps tags when moving files or renaming them via windows explorer.Seems so it monitors the changes all the time which is nice.And it also has integration into the rightclick menu of windows explorer for quick tagging files.Too bad it has a monthly subscription.One time purchase would be ok for me.
But anyway, doing that in some way with Everything would be so awesome.Isnt it possible to add a second database which stores tags for files while everything service also monitors the changes in the file system and then add the changes to the tag database.Dont know much about software coding or so but it would be awesome.

Sry for my bad english.Greets!
NotNull
Posts: 5517
Joined: Wed May 24, 2017 9:22 pm

Re: File/Folder Tagging

Post by NotNull »

NotNull wrote: Some time ago I "investigated" metadata/tagging. I think I will post those thoughts on these forums [...]. Might take a while, though.
Forgot about that completely! I did write a little story, including a table to compare different tagging strategies based on different file manipulations. But it's gone ... (was on a virtual machine that I reverted back to it's original state).

These are the notes that survived:

Code: Select all

Ways to tag /use metadata

Difference metadata / tags (my opinion)
Metadata: properties of the document, like resolution, bitrate. Technical information
Tags: Personal information, keywords added


- save tags in a separate database
- save tags in the file itself
- save tags in an alternate datastream of the file
- save tags in a tag-file in the folder of the file
- save tags in the fileNAME
- save tags in MFT
- Universal frontend to access different styles (see above) of tags.


Scenarios to consider: some common file manipulations (CRUD)

- copy file to different folder
- move file to different folder
- copy/move file to different filesystem
- backup the file
- Zip the file for "transport"
- mail file as attachment
- save file in cloud
- delete file


Other considerations:

- Tags per system vs tags per user:
    - Perspective: One's outgoing label is another one's incoming; Tags "My little sister","me" vs "My big brother","me"
    - Is everyone allowed to read all tags? Could contain sensitiive data (tags: "todo" "fire John") 

- Speed. Speed of tagging (one-time operation) vs speed of reading tags.
- Reading "just-in-time" or reading from database.
- Tagging files where you don't have write access to (Windows, Program Files, read-only files,..)
- In case of Everything: Use an existing system or create /maintain a system (import tags from other sytems?)

Last edited by NotNull on Tue Dec 26, 2017 10:39 pm, edited 2 times in total.
NotNull
Posts: 5517
Joined: Wed May 24, 2017 9:22 pm

Re: File/Folder Tagging

Post by NotNull »

Stamimail wrote: I think I stopped where I couldn't decide what's the right solution. Each method (where the tags are stored) has its drawback.
I came to the same conclusion.
On the one hand,
I want the Tags will be kept even though I renaming the files or moving them to other location, as long as they on my local machine.
On the other hand,
I don't want the Tagging will change the binary of the files. It's important to me to be able to use Compare or Duplicate Cleaner/Remover program later...
There are also other requirements like the ability to tag folders and to work in x64 [I even thought about FullTextTag or CommentAttached such as attaching lyrics to songs/audio files], but this is the main thing.
That sounds an awful lot like what hardlinks do. Create a hardlink to a file and use this hardlink for tagging. For example giving it a special filename.

EDIT: That isn't a very clear description of what I wanted to say. I'll try to write it in code. That's easier :-)
NotNull
Posts: 5517
Joined: Wed May 24, 2017 9:22 pm

Re: File/Folder Tagging

Post by NotNull »

I created a folder c:\MyTags, containing TAG.cmd (to create a tag) and searchTAG (to search for tags)
Note: these scripts are just to show what I could't explain very clearly.

C:\MyTags>dir /b
SearchTAG.cmd
TAG.cmd

C:\MyTags>tag c:\Tools\Everything\Everything.exe Test "Very important!" Util
Hardlink created for C:\MyTAGS\[Test][Very important][Util].0x0050000000006a86 <<===>> c:\Tool
s\Everything\Everything.exe

C:\MyTags>SearchTAG.cmd util
\Tools\Everything\Everything.exe

C:\MyTags>SearchTAG.cmd util test
\Tools\Everything\Everything.exe

C:\MyTags>ren c:\Tools\Everything\Everything.exe xxeverythingxx.exe

C:\MyTags>SearchTAG.cmd util
\Tools\Everything\xxeverythingxx.exe

C:\MyTags>move c:\Tools\Everything\xxeverythingxx.exe c:\
1 file(s) moved.

C:\MyTags>SearchTAG.cmd util
\xxeverythingxx.exe

C:\MyTags>move \xxeverythingxx.exe c:\Tools\Everything\Everything.exe
1 file(s) moved.

C:\MyTags>SearchTAG.cmd util
\Tools\Everything\Everything.exe

C:\MyTags>dir /b
SearchTAG.cmd
TAG.cmd
[Test][Very important][Util].0x0050000000006a86


TAG.CMD:

Code: Select all

@setlocal enabledelayedexpansion
@echo off
:: Syntax: TAG.cmd <filename> <tag1> <"tag with spaces">


:: SETTINGS
    set TAGPATH=\MyTAGS
    set DRIVE=C:

:: INIT (split FILENAME and tags)
    for /f "tokens=1,* delims= " %%x in ("%*") DO set TAGFILE=%%x& set TAGS=%%y

:: GET FileID/FRN of the filename
    for /f "usebackq tokens=4 delims= " %%x in (`fsutil.exe file queryfileid %TAGFILE%`) DO set FRN=%%x&
        
::  Create Tag structure ( [tag1][next tag] )
    for %%x in (%TAGS%) DO set search=!search![%%~x]
    
:: Create hardlink
    mklink /H "%DRIVE%%TAGPATH%\%search%.%FRN%" %TAGFILE%

SearchTAG.CMD:

Code: Select all

@setlocal enabledelayedexpansion
@echo off
:: Syntax: SearchTAG.cmd tag1 "tag with spaces" tag3


:: SETTINGS
    set TAGPATH=\MyTAGS
    set DRIVE=C:

:: INIT

::  Create search structure ( [tag1] [next tag] from commandlinme
    for %%x in (%*) DO set search=\[%%~x\] !search!
    set search="%search%"
    
:: Search for tags in all MyTag files and report the matching hardlinks (outside the tagfoolder)
    for /f "usebackq delims=" %%x in (`dir /b "%DRIVE%%TAGPATH%\*.0x*" ^| findstr /i %search%`) DO (
        fsutil.exe hardlink list "%%x" | findstr /b /i /v "%TAGPATH%\\"
    )

Stamimail
Posts: 1122
Joined: Sat Aug 31, 2013 9:05 pm

Re: File/Folder Tagging

Post by Stamimail »

NotNull wrote:Difference metadata / tags (my opinion)
Metadata: properties of the document, like resolution, bitrate. Technical information
Tags: Personal information, keywords added
Image
Couple months ago I came to the same conclusion and I wanted to open a new Thread about it. I wanted to write, but it did not happen.. So I'll take this opportunity here to write about it.
I will use your terminology: Metadata (properties, technical information) and Tags (Personal).
I think Microsoft leaded to a confusion when they decided to join together 2 different things.
They took Tags and insert it to Metadata/Properties. I think it's wrong. Mainly because when the user make personal tagging it is changing the binary code of the file.
What should be done, IMHO, is to leave Properties at their place, and move/take out the tags to be managed by database or other method.
Properties should be edited at the first days of the creation of the file, before its publication, and will include all the info the creator of the file wants to attached to it for whole file life. This info travel with the file from PC to another PC.
Tags will be used for Personal information, keywords added (Personal customization). This info shouldn't travel without permission.

What is the best method for Tags, whether it is hardlinks or another method, it needs more discussion.
NotNull
Posts: 5517
Joined: Wed May 24, 2017 9:22 pm

Re: File/Folder Tagging

Post by NotNull »

Stamimail wrote:
NotNull wrote: What is the best method for Tags, whether it is hardlinks or another method, it needs more discussion.
Don't think using hardlinks for tagging is the ultimate solution (it just fulfilled your requirements, that's the only reason why I mentioned it :- )

A few disadvantages of using hardlinks:
- In Windows, hardlinks are only supported on local NTFS filesystems. Not on FAT(32), no ReFS. DFS (Distributed FileSystem) does not support hardlinks. No harlinks kn remote filesystems (\\server\share or Z;\ ...) No tagging possible for files on CD-ROMs
- Hardlinks always have to be on the same volume ("driveletter") as the file it points to. So, if you move or copy a file from C: to D: , the new file will no longer have a tag /hardlink.
- You can create a hardlink (=tag) to a file that is in use (loaded in memory), but as long as that file is in use, you cant remove the hardlink.
- Not sure (can't test right now) but I thought that you need to be an administrator in Windows 7 to create/delete hardlinks. FSUTIL needs elevation for sure; creating symbolic links too; just dont remember about MKLINK /H (In Win10 those things can be done as a restricted user)
- (The current version of) Everything doesn't handle hardlinks very well. (And why should it?)
Stamimail
Posts: 1122
Joined: Sat Aug 31, 2013 9:05 pm

Re: File/Folder Tagging

Post by Stamimail »

You mentioned CD-ROMs.
CDs are good example for files that went through a finalize process. You can't edit again their properties.
Let's take for example mp3 files. Generally you can find the Artist in the properties, but you can't find there the song words (the lyrics). The lyrics need to be saved in a TagsDataBase somewhere outside of the files.
In a case the user don't remember the name of the file/song, but he remember just few words, and he wants to search for the file/song by searching:
Artist:"AtistName" Lyric:"Abc Def Ghi"
the user need a soft that will collect both the properties of the files and the TagsDataBase info.
Stamimail
Posts: 1122
Joined: Sat Aug 31, 2013 9:05 pm

Re: File/Folder Tagging

Post by Stamimail »

Stamimail wrote: Sun Jul 30, 2017 11:13 pm On the other hand,
I don't want the Tagging will change the binary of the files. It's important to me to be able to use Compare or Duplicate Cleaner/Remover program later...
I thought of a solution, but need to check if it's technically possible:
Let the Tagging to change the binary of the files. Make the Compare or Duplicate Cleaner/Remover programs wiser.

Those kinds of programs won't compare the whole binary of a file, but only one section from the file structure.
NotNull
Posts: 5517
Joined: Wed May 24, 2017 9:22 pm

Re: File/Folder Tagging

Post by NotNull »

These days executables (including DLL's etc) are signed. This is done to prevent tampering with them. Changing such a file is not an option.
Stamimail
Posts: 1122
Joined: Sat Aug 31, 2013 9:05 pm

Re: File/Folder Tagging

Post by Stamimail »

OK, You raise another problem - how to tag executable files. (maybe to create a container)

My thought was about Audio and Photos files, which you can currently edit their tags/properties, but their binaries are changed by this edit.
Post Reply