Whats the best way to read/write file properties (like author, description, etc) in C#? I can use dsofile.dll to accomplish this but I wonder if this is the right way to go. (being unmanaged code?)
Any ideas?
Click the File tab. Click Info to view the document properties. To add or change properties, hover your pointer over the property you want to update and enter the information. Note that for some metadata, such as Author, you'll have to right-click on the property and choose Remove or Edit.
Just as in Windows Explorer, you can view the properties of any file or folder by right-clicking the file, then clicking Properties. Local pane information: Type: Kind of item (e.g., HTML document, File Folder)
In File Explorer, hold down the ALT key and simply double click the file or folder. The Properties window will open directly! You don't need to right click and select the Properties menu item. If you prefer exclusively using the keyboard, you can select the file and press Alt+Enter.
Microsoft explicitly recommends dsofile.dll for use with .NET. Not sure why you think this would be inappropriate - it ultimately uses the very code that other structured file readers also use. Reimplementing this in managed code would be error-prone, and likely does more harm than good.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With