In a sync involving multiple subdirectories, we only want to sync an unsystematic subset of the files and subdirectories. I'm sure that this is a very simple problem, but I can't work it out.
Everything is NTFS, including all USBs, and 'Copy all NTFS Data Streams' is enabled in Preferences, so one approach seems to be:
Add to all items a metadata field called say 'Sync'.
Then add some text, say 'Exclude', to this field for each item not to be synced.
Then use a DOpus filter to exclude the 'Exclude' items from syncing.
These procedures could then easily be extended to multiple texts in the 'Sync' field, and a filter involving wildcards and 'and/or'.
QUESTION 1. Can the JScript creation of a new column also create a new metadata field, or is one restricted to the metadata fields that are already there? Each of the obvious fields 'Comment', 'Tags' and 'Description' is already used by one or more of the relevant files.
That is, can JScript somehow carve out, presumably from the Alternate Data Stream of every file, a brand new metadata field?
QUESTION 2. If so, can a button be created to edit this new field in such a way that the item's filedate does not change?
QUESTION 3. DOpus' filter drop-down has an item 'script column' — how does one control which of several script columns the filter will look at?
As my questions indicate:
I am unclear about the relationship between 'metadata' and 'columns'.
I am also unclear whether or not any new metadata field applicable to all file types and folders would have to come from the Alternate Data Stream.
Done — with your vital clues, leo. I'll post in the 'Completed Scripts' section when I've cleaned things up. Clearly ADS has many other uses, but despite intensive searching, I am missing one further vital clue:
QUESTION: What is the JScript command to list all the alternate data streams of a given file, presumably as a collection?
The obvious workaround: Save the output of stream.exe or LADS.exe to a text file, then read in the successive lines of the file. But this would be clumsy if there is an available JScript command.
I'm not sure off the top of my head, but even if a script could enumarate the ADS streams, they tend to be in undocumented binary formats so I am not sure you could do much with the ones other tools had created, without a lot of effort.
You can also use Powershell v3 to list streams (maybe as a fallback for stream.exe), powershell always takes time to startup, so this is a bad choice for single calls. But if you were to write something script-based that needs to makes heavy use of streams, I'd choose this over the external tool approach, should be much easier and not much slower, once the powershell session is initialized and rushes through the filesystem.
powershell.exe -command gi .\<yourfilewithstreams.ext> -stream *
And then there also is "dir" from cmd.exe, just to mention these alternatives! o)
That's good advice, tbone. Why use external tools just to list the ADS files when the faithful old dir command is there? Even with Powershell, I had to download the new version 3.
I have now posted the completed procedure, which may be useful to others with the same problem. Thanks once again to leo, jon and tbone.