can i make windows file explorer show certain text extracted from files as a new detail column? - windows

I have folders full of log files, and I'd like to display their final status in a column in the folder they are in. That is, in Details view I want to make a new column that shows a piece of text which is extracted from each file. I don't expect to find such a thing out there, and the searches I've tried haven't even yielded a hint about how I would go about writing a plugin to do any such thing. Is it possible?

This sort of thing used to be possible with custom column handler shell extensions but Microsoft removed support for those in Vista (3rd-party Explorer replacements might still support them).
Microsofts inadequate replacement are property handlers. You cannot do this for .log files, you would have to invent a .myapp-log file extension.
Some people abuse the Windows 10 cloud API to create columns but that only works in specific folders.
If you are looking for a specific string in the last line, you could perhaps use a custom icon handler for .log files.

Related

shortcut to files on network share whose name keep changing constantly

There is a network share used as repository in my company and it is quite difficult to navigate through it and find certain files. Some of these files get a new name every day , usually the date changes, which makes it impossible to create shortcuts to them. Usually these are excel or word files. Is there a way I can create a shortcut to that file even though the date has changed on the name of the file?
If you definitely have to use a shortcut (lnk file) for this the only workaround that comes to mind is pointing the shortcut to an environment variable and changing that programatically (wildcards are not supported in lnk files afaik).
However I assume that in most cases what you want is not really a shortcut in its technical definition but rather a way to open the file you want with a double click. In this case it would be a lot easier to just use a simple script that figures out what the name of the file currently is (by whatever rules you use manually) and launch it.
Should be doable in vbscript or powershell (maybe even batch) just fine as long as there is some logical way to determine which file is the right one (e.g. always the current date, always the file where the date is newest, the only file with extension xlsx, ...)

Changing default program for a file type (workaround)

I would like to specify that images of a certain type (for example, .png) open by default in a program I've written when the file is contained in a certain directory. I've seen by searching (Change Default Program for a specific folder) that this is not possible on Windows 7 or 8.
I am saving these images in this directory myself, so I have some leeway with how I name the files. For example, I could change the filename a bit... perhaps to be example.myprog.png or something similar. Is there a way to set it up so files that match this filename pattern get opened, while other .pngs (in other directories) still open in the default viewer?
I don't really want to name these PNG images example.myprog (i.e., fully change the extension), because when the user is browsing the directory in Windows Explorer, I would like the thumbnail images to still show up. Also, users will be eventually transferring these images to their own machines, where they'll want to use standard image viewers to look at them.
If this is not possible, does anyone have another suggestion for how to tackle this problem?
As you are mentioning that files should be opened in a program that you have written, try to change the code of your program to read files from the specific folder. So, by opening your program from anywhere in your pc, you should be able to open files from specified folder.

Custom folder field for windows 7

I would like to be able to add a custom field to folders in windows 7, and then be able to show that column(field) when viewing the folder in explorer (sort and group etc).
Question:
How can I achieve this? (is there a program I can buy / use or is there a way of doing this in windows 7?)
Example use case: I have folders for each job that I do - I'd like to mark the folder as "pending", "done" etc. I'm using custom folder markers at the moment - but that's limited. Having a number of these fields would be really powerful.
Basically, you need to create a new Windows Property. See Windows Property System at http://msdn.microsoft.com/en-us/library/ff728898(VS.85).aspx. I do not know of any program that allows you to create properties.
Moreover, see Creating Custom Properties at http://msdn.microsoft.com/en-us/library/cc144135(VS.85).aspx.
Here is an MSDN search for "Windows Property System" to get you started (http://social.msdn.microsoft.com/Search/en-US?query=%22Windows%20Property%20System%22)
Note, that Windows Runtime (WinRT) will make handling this properties fairly easy.
See: http://blog.rodhowarth.com/2008/06/how-to-set-custom-attributes-file.html
It appears using the DSOFile DLL from Microsoft you can add custom attributes to a file as long as it is on a NTFS.
However re-saving some file types depending on how their applications handle it - may strip the previously added custom property.
I think, you are just being silly, this will quickly overwhelm you with information overload,
you should simply instead of adding columns, just create folders and dump every folder you need inside it like so,,,
> - Pending
> - client 1
> - client 2
> - Done
> - client 3
lets, say you have finished with client 2 you just drag and drop it on the Done folder, or cut, and paste it on done,
easier to manage,
here is a something, I stumbled across, I think its alot more difficult to manage eitherway, your better off using excel, or simply the structure I mentioned above.
http://rkeithhill.wordpress.com/2005/12/10/msh-get-extended-properties-of-a-file/
hope this helps somehow.

Decrypt/Read/Modify “.automaticDestinations-ms” and/or ".customDestinations-ms"

Does anyone know how to read the files Microsoft creates for JumpLists?
I want to clear from JumpList all history/most visited/recently closed, WITHOUT clearing up the tasks.
I tried to use the APPID from win7api, and clear for example, google chrome's jumplist. But with "ClearAllUserTasks" method it clears EVERYTHING from the jumplist, even the "Tasks". The same thing is with deleting the file.
Isn't any way of knowing the format of the *destinations-ms files, so I can modify them myself? Basically, wanting to clear just history/most visited, but couldn't find anything in Windows 7 Api (nor C++ or .NET).
The file is a Structured Storage file.
The OpenMCDF project is capable of reading and basic editing out of the box and you can easily create a specific tool with the library.
Here are steps to the hacky approach I took to clear Chrome's Recent list:
Open the AutomaticDestinations folder
%APPDATA%\Microsoft\Windows\Recent\AutomaticDestinations
Sort the AutomaticDestinations folder descending by Date modified
Open Chrome and visit a site
In the AutomaticDestinations folder, rename the most recently modified item
Right click on Chrome's icon
If the Recent list has been removed, you have the right file and can delete it.
Otherwise, repeat steps 3 through 5 until the Recent list is empty
Don't forget to return the other files back to their original names.
To clear the Recent list of other applications, open them and perform and action that will cause their list to be modified.
The advantage of this method is that removes the need to read .automaticDestinations-ms files.

Does Windows cache the contents of .url (Internet Shortcut) files?

I'm implementing a custom URL handler in .NET. To test this, I have created a few different .url files and put them on my Desktop. This generally works fine, but behaves oddly if I change the file's contents, specifically the URL= line. Doing so has no effect — the old URL continues to be opened. Renaming the file, however, works. The file looks like this:
[{000214A0-0000-0000-C000-000000000046}]
Prop3=19,0
[InternetShortcut]
URL=myCustomScheme://some/url/pointing/somewhere
IDList=
All shortcuts I create through New → Shortcut receive the same UUID, so changing that probably won't help.
Is there some internal .url file / URL mapping cache in Windows?
I have a reason to believe that URL files are interpreted by some Internet Explorer component at the time of creation (not biblical). They are only interpreted initially, the first time the file is created. Any modifications to the URL file later on will not be committed. This is because the shortcut is not stored in the file. This is why the file can be modified later on so that it becomes empty, as a 0 byte file and the URL file will appear to be working anyway. The shortcut data is stored in the "Web Document" field as a file property in the NTFS file system. The file merely serves the purpose of pointing to it. You might be able to modify these property fields programmatically, which would supposedly "edit the file". It's a painful exercise just to edit what appears to be a simple text file.
Additionally, once a file name has been used for a URL file, it cannot be reused for new files, no matter what disk or path you save it to. So you have to keep assigning unique file names, never used previously, for each new URL file you create. This has to do with how Internet Explorer caches web content. It remembers what file names have been used already and maps those names to previously defined URL addresses. To reuse a name (or when you run out of ideas for new and unique file names) you have to clear Temporary Internet Files.
Windows 7: %localappdata%\Microsoft\Windows\Temporary Internet Files
Windows 8: %localappdata%\Microsoft\Windows\INetCache
To directly answer your question: yes, it does.
Windows 7 Caches your Filenames and sometimes, as you said, the filenames in specific locations.
Start regedit and search for the following
HKEY_USERS\S-1-5-21-x-x-x-x\Software\Classes\Local Settings\Software\Microsoft\Windows\Shell\MuiCache
where S-1-5-21-x-x-x-x is your currently logged in User.
There you can see that most (or all?) files have been cached which you have ever accessed.
Maybe you can also deactivate the MUICaching programatically. Maybe this site helps you: Disable Caching
I had a similar issue, and it turns out the culprit was Firefox.
If by chance your web browser is Firefox, your cache directories may be corrupted.
You can either create a new Profile, or take your chances cleaning things out of C:\Users\<username>\AppData\Local\Mozilla\Firefox\Profiles\<profile>\
I've found my desktop .url shortcut contents cached in %LocalAppData%\Microsoft\Windows\Caches.
There are a few (several?) files with filenames like {<SOME_GUID>}.<x>.ver0x<XXXXXXXXXXXXXXXX>.db. Two of them had the .url files cached.
Unfortunately, I've found no information on what they are or how to refresh them. Everybody just deletes them as part of some cache clean-up operation.

Resources