Thanks for the help & directions so far, but all the options given so far does not give me the full control over these properties.
The method JordanChris mentioned works only for OLE objects & not a plain txt file. Yes I can use a Word Document or something like that , but then I have to live with that specific format. Not really what I want.
The Shell Method from KayJay works for retrieving the info from the text file, but I have no way of writing to these properties.
Any ideas? This seems to be a nice challenge...any takers?
I managed to get this done. It works but the details are not showing up in the Shell GUI (Right Click --> Properties --> Summary) though the code returns the correct values on retrieval
STREAMS - This seems to be the route to go KayJay and I can use it, but I would still like to know how to access the Main Stream as explained in the article.
The solution you have given here is for all the extra streams supported by NTFS & win32 file systems as pointed out by the article. Unfortunately you will not be able to keep the info intact
when copying the file to non NTFS & WIN32 file systems, like CD's or floppy drives etc.
I am particularly interested in retrieving the main streams information that's supported since win3.1. The image below indicates the main stream.
Under an NTFS file system each file can have multiple streams of data. It's worth pointing out that streams are not a feature of NTFS 2000, but they have been in existence since Windows NT 3.1. When you read the content of a file under a non-NTFS volume (say, a disk partition of a Windows 98 machine) you're able to access only one stream of data. Consequently, you perceive it as the real and "unique" content for that file. Such a main stream has no name and is the only one that non-NTFS file systems can handle. But when you create a file on an NTFS volume, things might be different. Look at Figure 1 to understand the big picture.
I am leaving this post to see if anyone else has ideas. I suspect that the Author info, when viewing the properties tab from the file is stored in this stream.
Thank you very much KayJay.This has helped me immensely & I certainly will be able to use it. I will just have to make sure we dont need any backward compatibility. I can definately recommend this forum.
I think my assumptions about the Main Stream was also wrong. The fact is when you copy the file to floppy drive, all that info is gone. What a waste
Do any of you have some ideas to try and keep the info when copying these files to non NTFS partitions, like keeping a register file with info of all files in a single file. Then write an app to re-write the stream info from this register file when copying it from the disk etc.
U could create two separate routines (Copy and Paste) which read the various streams, deposit them in a hierarchical/structured single-stream file and while pasting writes back those streams onto the NTFS Volumes for the files.
Copy Routine
1) Read file contents
2) Read all the different streams
3) Store the above in a Flat - File as a User Defined Type
4) Move that file onto a FAT16 or FAT32 Volume
Paste Routine
1) Read the Flat File from a FAT16 or a FAT32 Volume into the User Defined Type
2) Write the file onto the target NTFS Volume with its contents
3) Write each stream and its contents
HTH
PS: I have posted some rudimentary code here for a more generalised treatment on multiple streams on NTFS Volumes.
"Brothers, you asked for it."
...Francisco Domingo Carlos Andres Sebastian D'Anconia
I have meant to post my thanks in this thread. lol
Thank you for your time and effort so far.
I am going to put a class together incorporating all the functionality so far, but I would like to keep this thread open untill someone can show us how to get that Author & Comments Properties that does not seem to be part of the additional streams.
Once Im done with the Class & you don't mind me using some of your code & ideas, I would like to make it available for your code bank.