This project has moved and is read-only. For the latest updates, please go here.
Command line support for managing which extensions File Meta handles is provided by FileMetaAssoc.exe (installed in the program files folder 'File Metadata').

Here is the full set of options:

FileMetaAssoc.exe {-l|-a|-r|-h} [-p=<profile name>]
[-d=<definition file name>] [<extension> ...]

Where:

-l, --list
List all extensions with the File Meta property handler
-- OR --
-a, --add
Add the File Meta property handler for the specified extension(s)
(Requires administrator privileges)
-- OR --
-r, --remove
Remove the File Meta property handler from the specified extension(s)
(Requires administrator privileges)
-- OR --
-h, --help
Display this help

-p=<profile name>, --profile=<profile name>
Profile to be used for -add

--d=<definition file name>, --definitions=<definition file name>
Profile definitions file to be used for -add

<extension>
One or more target extensions for -add or -remove, for example, .txt

Here are some notes on how to use it:

The list command produces a table of the associated extensions, for example:

C:\Program Files\File Metadata>FileMetaAssoc.exe -l
.pdf    Office DSOfile  File Meta Property Handler
.txt    Simple          File Meta Property Handler
.bmp    .bmp            File Meta + IPropertyStore Handler for Images
.jpg    .jpg            File Meta + IPropertyStore Handler for Images

The data is tab-delimited, to make it easier to, say, import into Excel, or parse with another program.

The remove command simply removes the File Meta association from the specified extension or extensions, for example:
FileMetaAssoc.exe -r .txt
FileMetaAssoc.exe -r .txt .bmp

This command will only work if is run from an environment that has Administrator privileges. The program itself will never prompt for escalation.

The add command is the most complex, as it requires a profile, and optionally a definition file, to be specified, for example:
FileMetaAssoc.exe -a -p=simple .txt
FileMetaAssoc.exe -a -p="office dsofile" .pdf
FileMetaAssoc.exe -a -p=.bmp -d="D:\Configs\SavedState.xml" .bmp

Again, this command must be run from an environment that has Administrator privileges.

Note that the profile name is not case sensitive. The definition file is not required if the profile is built in, i.e. Simple or Office DSOfile. Also, if omitted, the program will look for the definition file stored by File Meta Association Manager on the same machine by the current user.

If a definition file is specified, then it should be a copy of a definition file created by File Meta Association Manager. This file can be found at
"<System drive>:\Users\<Username>\AppData\Roaming\FileMeta\SavedState.xml". FileMetaAssoc cannot create profiles, in fact it opens the definition file read-only. Thus, if you are extending an existing property handler, you should first set it up using the File Meta Association Manager, then use the definition file that it creates with FileMetaAssoc, typically specifying the profile with the same name as the extension. However, if a definition file is specified, the specified profile will be copied to the File Meta Association Manager definition file, so that this program can later be used to manage the property handler Association created by FileMetaAssoc, should you so wish.


Last edited Oct 8, 2016 at 11:48 AM by Dijji, version 11

Comments

No comments yet.