All the programs in the world and I can't find this one
May 26, 2007 8:50 AM   Subscribe

How do I change Extended File Attributes (also known as NTFS File Attributes) like Title, other than one at a time?

I have a few hundred files called things like 1234_ABCDE.htm. I'd like to rename them to 1234.htm, which I can easily make a command file to do. But then I'd like the ABCDE part to be in one of the extended attributes that show up in file explorer or any folder window if I pick those columns (in Windows XP).

I don't want to do this one at a time using the Properties dialog Summary tag, but can't find any utility that lets me change these attributes any other way. I can't believe someone hasn't written one, but finding it - or writing one myself - is beyond me.
posted by EllenC to Computers & Internet (4 answers total) 3 users marked this as a favorite
 
Best answer: In NTFS they're called Alternate Data Streams. From a batch script you can edit one by appending the name to the file. For example:

echo "bar" > file.txt:foo

That would put "bar" inside the ADS named "foo". You would think that MS would call the Title ADS "Title", but a little experimenting shows that isn't the case. It's probably some sort of GUID name... you just have to figure out what that is :)
posted by sbutler at 9:43 AM on May 26, 2007


Response by poster: Thanks - that's just what I wanted! But I'm having trouble figuring out the name of any of the ADS I can see. I tried the LADS tool and echoing to all the streams I saw there (including the hidden characters), and while I think that what I want is either SummaryInformation, DocumentSummaryInformation (both starting with x05) or {4c8cc155-6c1e-11d1-8e41-00c04fb9386d}, I can't seem to write anything to any of those that shows up in the Summary Properties tab or folder columns. (I did manage to get rid of the Summary Props tab for one of my files, somehow). I'm still researching, but most of what I'm reading is pretty well over my head, so if anyone has any more info, I'd really be grateful.
posted by EllenC at 11:34 AM on May 26, 2007


Response by poster: OK, just in case anyone goes back and reads this in the future - I think it's a lot less straightforward than just writing the file. Writing the file is easy, but the file with the actual summary info that shows up in explorer is a binary file. It's pretty easy to find the file structure documentation, but I think the only way to write to it is have a program. I can copy the summary info files to visible files and open them in a hex editor, but the strings don't always start at the same bit, and are also bitflipped. Getting someone to write the program would probably be a lot simpler than the amount of fudging I'd end up doing.
posted by EllenC at 6:59 AM on May 27, 2007


One way to do this would be to write a macro in MS word - it reads HTML files and it can read/write the summary info.
So it should be possible to have a macro open all the files in a folder, read the summary info for each one and save in a separate folder.
Of course Word will probably mess up the HTML in the process, but you could use the new filenames created to then rename the original files.
posted by Lanark at 9:23 AM on May 27, 2007


« Older What is Equitable in a Book Deal?   |   Watching TiVo shows on another computer Newer »
This thread is closed to new comments.