1

I'm trying to read extended properties from music files on a network share (Author, Album, etc.)

This line (adapted from code at Read/Write 'Extended' file properties (C#))

objFolder = shell.Namespace(@"C:\somefolder");

Works but these lines set objFolder to null:

objFolder = shell.Namespace(@"\\nasdrive\somefolder");

(with Z mapped to \nasdrive)

objFolder = shell.Namespace(@"Z:\somefolder");

I have tried to use impersonation from http://platinumdogs.me/2008/10/30/net-c-impersonation-with-network-credentials/ to wrap the code but it's not working.

(The impersonation works for normal file access though: File.Open(...), etc)

How can I read these extended properties without moving the files to a local drive?

Community
  • 1
  • 1
RochJohn
  • 11
  • 2

1 Answers1

0

If you're reading from a network share, why are you escaping special characters, then using 4 backslashes?

objFolder = shell.Namespace(@"\\\\nasdrive\somefolder");

I would think it should be:

objFolder = shell.Namespace(@"\\nasdrive\somefolder");

or

objFolder = shell.Namespace("\\\\nasdrive\\somefolder");
lesur
  • 261
  • 2
  • 7